# imports
from keras.applications.vgg16 import VGG16
from keras.models import Model, Input
from keras.layers import Dense, Conv2D, MaxPool2D, Dropout
from keras.layers import Flatten
from keras.applications.vgg16 import decode_predictions
from keras.models import Sequential
from keras.optimizers import Adam, Adamax
import glob
import matplotlib.pyplot as plt
from PIL import Image
import numpy as np
import tensorflow as tf
seed = 1
np.random.seed(seed)
tf.random.set_seed(seed)
# load data
X = []
Y = []
for filename in glob.glob('/content/drive/MyDrive/images/pretrained/training/anger/*.jpg'):
im=Image.open(filename).convert('RGB')
im=im.resize((224,224))
arr = np.array(im)
X.append(arr)
Y.append(1) # anger class
for filename in glob.glob('/content/drive/MyDrive/images/pretrained/training/disgust/*.jpg'):
im=Image.open(filename).convert('RGB')
im=im.resize((224,224))
arr = np.array(im)
X.append(arr)
Y.append(2) # disgust class
for filename in glob.glob('/content/drive/MyDrive/images/pretrained/training/fear/*.jpg'):
im=Image.open(filename).convert('RGB')
im=im.resize((224,224))
arr = np.array(im)
X.append(arr)
Y.append(3) # fear class
for filename in glob.glob('/content/drive/MyDrive/images/pretrained/training/happy/*.jpg'):
im=Image.open(filename).convert('RGB')
im=im.resize((224,224))
arr = np.array(im)
X.append(arr)
Y.append(4) # happy class
for filename in glob.glob('/content/drive/MyDrive/images/pretrained/training/neutral/*.jpg'):
im=Image.open(filename).convert('RGB')
im=im.resize((224,224))
arr = np.array(im)
X.append(arr)
Y.append(5) # neutral class
for filename in glob.glob('/content/drive/MyDrive/images/pretrained/training/sad/*.jpg'):
im=Image.open(filename).convert('RGB')
im=im.resize((224,224))
arr = np.array(im)
X.append(arr)
Y.append(6) # sad class
for filename in glob.glob('/content/drive/MyDrive/images/pretrained/training/surprised/*.jpg'):
im=Image.open(filename).convert('RGB')
im=im.resize((224,224))
arr = np.array(im)
X.append(arr)
Y.append(7) # surprised class
# convert to np array
X = np.array(X)
# reshape
X = X.reshape(X.shape[0], 224, 224, 3).astype('float32')
# Normalize the data
X = X /255
# encode outputs
Y = np.array(Y)
# randomize the data set - numpy arrays
randomize = np.arange(len(X))
np.random.shuffle(randomize)
X = X[randomize]
Y = Y[randomize]
Y = tf.keras.utils.to_categorical(Y)
num_classes = Y.shape[1]
vgg = VGG16(include_top=False, weights='imagenet', input_shape=(224,224,3))
output = vgg.layers[-1].output
output = tf.keras.layers.Flatten()(output)
vgg = Model(vgg.input, outputs=output)
for layer in vgg.layers:
layer.trainable = False
vgg.summary()
Downloading data from https://storage.googleapis.com/tensorflow/keras-applications/vgg16/vgg16_weights_tf_dim_ordering_tf_kernels_notop.h5 58892288/58889256 [==============================] - 0s 0us/step Model: "model" _________________________________________________________________ Layer (type) Output Shape Param # ================================================================= input_1 (InputLayer) [(None, 224, 224, 3)] 0 _________________________________________________________________ block1_conv1 (Conv2D) (None, 224, 224, 64) 1792 _________________________________________________________________ block1_conv2 (Conv2D) (None, 224, 224, 64) 36928 _________________________________________________________________ block1_pool (MaxPooling2D) (None, 112, 112, 64) 0 _________________________________________________________________ block2_conv1 (Conv2D) (None, 112, 112, 128) 73856 _________________________________________________________________ block2_conv2 (Conv2D) (None, 112, 112, 128) 147584 _________________________________________________________________ block2_pool (MaxPooling2D) (None, 56, 56, 128) 0 _________________________________________________________________ block3_conv1 (Conv2D) (None, 56, 56, 256) 295168 _________________________________________________________________ block3_conv2 (Conv2D) (None, 56, 56, 256) 590080 _________________________________________________________________ block3_conv3 (Conv2D) (None, 56, 56, 256) 590080 _________________________________________________________________ block3_pool (MaxPooling2D) (None, 28, 28, 256) 0 _________________________________________________________________ block4_conv1 (Conv2D) (None, 28, 28, 512) 1180160 _________________________________________________________________ block4_conv2 (Conv2D) (None, 28, 28, 512) 2359808 _________________________________________________________________ block4_conv3 (Conv2D) (None, 28, 28, 512) 2359808 _________________________________________________________________ block4_pool (MaxPooling2D) (None, 14, 14, 512) 0 _________________________________________________________________ block5_conv1 (Conv2D) (None, 14, 14, 512) 2359808 _________________________________________________________________ block5_conv2 (Conv2D) (None, 14, 14, 512) 2359808 _________________________________________________________________ block5_conv3 (Conv2D) (None, 14, 14, 512) 2359808 _________________________________________________________________ block5_pool (MaxPooling2D) (None, 7, 7, 512) 0 _________________________________________________________________ flatten (Flatten) (None, 25088) 0 ================================================================= Total params: 14,714,688 Trainable params: 0 Non-trainable params: 14,714,688 _________________________________________________________________
# creation of the model, using the resnet architecture and adding my own classes after the flattening layer
model = Sequential()
model.add(vgg)
model.add(Dense(512, activation='relu', input_dim= (224, 224, 3)))
model.add(Dropout(0.3))
model.add(Dense(512, activation='relu'))
model.add(Dropout(0.3))
model.add(Dense(num_classes, activation='softmax'))
# summary of the model
model.summary()
# specifying a learning rate to optimizer adam
opt = tf.keras.optimizers.Adam(lr=0.000001)
# compiling the model
model.compile(loss='categorical_crossentropy', optimizer=opt, metrics=['acc'])
# Fit the model
history = model.fit(X, Y, validation_split=0.40, epochs=25, batch_size=32, verbose=1)
# summarize history for loss
plt.plot(history.history['loss'])
plt.plot(history.history['val_loss'])
plt.title('model loss')
plt.ylabel('loss')
plt.xlabel('epoch')
plt.legend(['train', 'test'], loc='upper right')
plt.show()
# summarize history for accuracy
plt.plot(history.history['acc'])
plt.plot(history.history['val_acc'])
plt.title('model accuracy')
plt.ylabel('accuracy')
plt.xlabel('epoch')
plt.legend(['train', 'test'], loc='upper right')
plt.show()
Model: "sequential_2" _________________________________________________________________ Layer (type) Output Shape Param # ================================================================= model (Functional) (None, 25088) 14714688 _________________________________________________________________ dense_6 (Dense) (None, 512) 12845568 _________________________________________________________________ dropout_4 (Dropout) (None, 512) 0 _________________________________________________________________ dense_7 (Dense) (None, 512) 262656 _________________________________________________________________ dropout_5 (Dropout) (None, 512) 0 _________________________________________________________________ dense_8 (Dense) (None, 8) 4104 ================================================================= Total params: 27,827,016 Trainable params: 13,112,328 Non-trainable params: 14,714,688 _________________________________________________________________ Epoch 1/25 112/112 [==============================] - 24s 211ms/step - loss: 2.4133 - acc: 0.0782 - val_loss: 1.8299 - val_acc: 0.3571 Epoch 2/25 112/112 [==============================] - 23s 209ms/step - loss: 1.9590 - acc: 0.2592 - val_loss: 1.6864 - val_acc: 0.3898 Epoch 3/25 112/112 [==============================] - 23s 208ms/step - loss: 1.8016 - acc: 0.2911 - val_loss: 1.6228 - val_acc: 0.3944 Epoch 4/25 112/112 [==============================] - 23s 208ms/step - loss: 1.7358 - acc: 0.3468 - val_loss: 1.5749 - val_acc: 0.4116 Epoch 5/25 112/112 [==============================] - 23s 209ms/step - loss: 1.6917 - acc: 0.3430 - val_loss: 1.5337 - val_acc: 0.4183 Epoch 6/25 112/112 [==============================] - 23s 209ms/step - loss: 1.6521 - acc: 0.3801 - val_loss: 1.4939 - val_acc: 0.4350 Epoch 7/25 112/112 [==============================] - 23s 208ms/step - loss: 1.5841 - acc: 0.4040 - val_loss: 1.4548 - val_acc: 0.4501 Epoch 8/25 112/112 [==============================] - 23s 208ms/step - loss: 1.5754 - acc: 0.4016 - val_loss: 1.4202 - val_acc: 0.4816 Epoch 9/25 112/112 [==============================] - 23s 208ms/step - loss: 1.5217 - acc: 0.4420 - val_loss: 1.3841 - val_acc: 0.4983 Epoch 10/25 112/112 [==============================] - 23s 208ms/step - loss: 1.5072 - acc: 0.4513 - val_loss: 1.3516 - val_acc: 0.5268 Epoch 11/25 112/112 [==============================] - 23s 208ms/step - loss: 1.4608 - acc: 0.4697 - val_loss: 1.3205 - val_acc: 0.5432 Epoch 12/25 112/112 [==============================] - 23s 208ms/step - loss: 1.4508 - acc: 0.4783 - val_loss: 1.2915 - val_acc: 0.5427 Epoch 13/25 112/112 [==============================] - 23s 208ms/step - loss: 1.4000 - acc: 0.4998 - val_loss: 1.2623 - val_acc: 0.5666 Epoch 14/25 112/112 [==============================] - 23s 208ms/step - loss: 1.3735 - acc: 0.5248 - val_loss: 1.2332 - val_acc: 0.5930 Epoch 15/25 112/112 [==============================] - 23s 209ms/step - loss: 1.3505 - acc: 0.5242 - val_loss: 1.2100 - val_acc: 0.5964 Epoch 16/25 112/112 [==============================] - 23s 208ms/step - loss: 1.3139 - acc: 0.5325 - val_loss: 1.1830 - val_acc: 0.6111 Epoch 17/25 112/112 [==============================] - 23s 208ms/step - loss: 1.2731 - acc: 0.5621 - val_loss: 1.1611 - val_acc: 0.6182 Epoch 18/25 112/112 [==============================] - 23s 208ms/step - loss: 1.2565 - acc: 0.5724 - val_loss: 1.1364 - val_acc: 0.6320 Epoch 19/25 112/112 [==============================] - 23s 209ms/step - loss: 1.2245 - acc: 0.5638 - val_loss: 1.1137 - val_acc: 0.6467 Epoch 20/25 112/112 [==============================] - 23s 208ms/step - loss: 1.2245 - acc: 0.5859 - val_loss: 1.0953 - val_acc: 0.6459 Epoch 21/25 112/112 [==============================] - 23s 208ms/step - loss: 1.1686 - acc: 0.6187 - val_loss: 1.0748 - val_acc: 0.6584 Epoch 22/25 112/112 [==============================] - 23s 208ms/step - loss: 1.1586 - acc: 0.6077 - val_loss: 1.0548 - val_acc: 0.6697 Epoch 23/25 112/112 [==============================] - 23s 208ms/step - loss: 1.1378 - acc: 0.6144 - val_loss: 1.0353 - val_acc: 0.6773 Epoch 24/25 112/112 [==============================] - 23s 209ms/step - loss: 1.1036 - acc: 0.6362 - val_loss: 1.0191 - val_acc: 0.6886 Epoch 25/25 112/112 [==============================] - 23s 209ms/step - loss: 1.0823 - acc: 0.6474 - val_loss: 1.0008 - val_acc: 0.6911
# creation of the model, using the resnet architecture and adding my own classes after the flattening layer
model2 = Sequential()
model2.add(vgg)
model2.add(Dense(512, activation='relu', input_dim= (224, 224, 3)))
model2.add(Dropout(0.3))
model2.add(Dense(512, activation='relu'))
model2.add(Dropout(0.3))
model2.add(Dense(num_classes, activation='softmax'))
# summary of the model
model2.summary()
# specifying a learning rate to optimizer adam
opt = tf.keras.optimizers.Adam(lr=0.000001)
# compiling the model
model2.compile(loss='categorical_crossentropy', optimizer=opt, metrics=['acc'])
# Fit the model
history = model2.fit(X, Y, validation_split=0.33, epochs=40, batch_size=64, verbose=1)
# summarize history for loss
plt.plot(history.history['loss'])
plt.plot(history.history['val_loss'])
plt.title('model loss')
plt.ylabel('loss')
plt.xlabel('epoch')
plt.legend(['train', 'test'], loc='upper right')
plt.show()
# summarize history for accuracy
plt.plot(history.history['acc'])
plt.plot(history.history['val_acc'])
plt.title('model accuracy')
plt.ylabel('accuracy')
plt.xlabel('epoch')
plt.legend(['train', 'test'], loc='upper right')
plt.show()
Model: "sequential_3" _________________________________________________________________ Layer (type) Output Shape Param # ================================================================= model (Functional) (None, 25088) 14714688 _________________________________________________________________ dense_9 (Dense) (None, 512) 12845568 _________________________________________________________________ dropout_6 (Dropout) (None, 512) 0 _________________________________________________________________ dense_10 (Dense) (None, 512) 262656 _________________________________________________________________ dropout_7 (Dropout) (None, 512) 0 _________________________________________________________________ dense_11 (Dense) (None, 8) 4104 ================================================================= Total params: 27,827,016 Trainable params: 13,112,328 Non-trainable params: 14,714,688 _________________________________________________________________ Epoch 1/40 63/63 [==============================] - 38s 591ms/step - loss: 2.1883 - acc: 0.1551 - val_loss: 1.8557 - val_acc: 0.2993 Epoch 2/40 63/63 [==============================] - 23s 369ms/step - loss: 1.9435 - acc: 0.2411 - val_loss: 1.7305 - val_acc: 0.3587 Epoch 3/40 63/63 [==============================] - 23s 362ms/step - loss: 1.8419 - acc: 0.2646 - val_loss: 1.6643 - val_acc: 0.4151 Epoch 4/40 63/63 [==============================] - 23s 365ms/step - loss: 1.7610 - acc: 0.3114 - val_loss: 1.6159 - val_acc: 0.4441 Epoch 5/40 63/63 [==============================] - 23s 370ms/step - loss: 1.7259 - acc: 0.3389 - val_loss: 1.5742 - val_acc: 0.4527 Epoch 6/40 63/63 [==============================] - 23s 366ms/step - loss: 1.6671 - acc: 0.3682 - val_loss: 1.5386 - val_acc: 0.4604 Epoch 7/40 63/63 [==============================] - 23s 365ms/step - loss: 1.6467 - acc: 0.3782 - val_loss: 1.5071 - val_acc: 0.4792 Epoch 8/40 63/63 [==============================] - 23s 366ms/step - loss: 1.6232 - acc: 0.3813 - val_loss: 1.4763 - val_acc: 0.4995 Epoch 9/40 63/63 [==============================] - 23s 368ms/step - loss: 1.6081 - acc: 0.3954 - val_loss: 1.4478 - val_acc: 0.5208 Epoch 10/40 63/63 [==============================] - 23s 366ms/step - loss: 1.5624 - acc: 0.4283 - val_loss: 1.4195 - val_acc: 0.5285 Epoch 11/40 63/63 [==============================] - 23s 365ms/step - loss: 1.5271 - acc: 0.4471 - val_loss: 1.3932 - val_acc: 0.5473 Epoch 12/40 63/63 [==============================] - 23s 367ms/step - loss: 1.5072 - acc: 0.4604 - val_loss: 1.3667 - val_acc: 0.5467 Epoch 13/40 63/63 [==============================] - 23s 365ms/step - loss: 1.4743 - acc: 0.4606 - val_loss: 1.3407 - val_acc: 0.5508 Epoch 14/40 63/63 [==============================] - 23s 368ms/step - loss: 1.4676 - acc: 0.4710 - val_loss: 1.3173 - val_acc: 0.5645 Epoch 15/40 63/63 [==============================] - 23s 367ms/step - loss: 1.4354 - acc: 0.4854 - val_loss: 1.2946 - val_acc: 0.5696 Epoch 16/40 63/63 [==============================] - 23s 367ms/step - loss: 1.3944 - acc: 0.5046 - val_loss: 1.2726 - val_acc: 0.5823 Epoch 17/40 63/63 [==============================] - 23s 367ms/step - loss: 1.3788 - acc: 0.5073 - val_loss: 1.2503 - val_acc: 0.5859 Epoch 18/40 63/63 [==============================] - 23s 368ms/step - loss: 1.3612 - acc: 0.5165 - val_loss: 1.2293 - val_acc: 0.5920 Epoch 19/40 63/63 [==============================] - 23s 366ms/step - loss: 1.3326 - acc: 0.5379 - val_loss: 1.2093 - val_acc: 0.6021 Epoch 20/40 63/63 [==============================] - 23s 366ms/step - loss: 1.3048 - acc: 0.5566 - val_loss: 1.1910 - val_acc: 0.5950 Epoch 21/40 63/63 [==============================] - 23s 367ms/step - loss: 1.3102 - acc: 0.5384 - val_loss: 1.1719 - val_acc: 0.5981 Epoch 22/40 63/63 [==============================] - 23s 367ms/step - loss: 1.2663 - acc: 0.5617 - val_loss: 1.1531 - val_acc: 0.6138 Epoch 23/40 63/63 [==============================] - 23s 368ms/step - loss: 1.2760 - acc: 0.5614 - val_loss: 1.1370 - val_acc: 0.6189 Epoch 24/40 63/63 [==============================] - 23s 367ms/step - loss: 1.2496 - acc: 0.5649 - val_loss: 1.1203 - val_acc: 0.6347 Epoch 25/40 63/63 [==============================] - 23s 368ms/step - loss: 1.1952 - acc: 0.6015 - val_loss: 1.1038 - val_acc: 0.6331 Epoch 26/40 63/63 [==============================] - 23s 367ms/step - loss: 1.2215 - acc: 0.5792 - val_loss: 1.0881 - val_acc: 0.6484 Epoch 27/40 63/63 [==============================] - 23s 366ms/step - loss: 1.2067 - acc: 0.5819 - val_loss: 1.0736 - val_acc: 0.6535 Epoch 28/40 63/63 [==============================] - 23s 367ms/step - loss: 1.1896 - acc: 0.5960 - val_loss: 1.0591 - val_acc: 0.6616 Epoch 29/40 63/63 [==============================] - 23s 365ms/step - loss: 1.1564 - acc: 0.6151 - val_loss: 1.0445 - val_acc: 0.6723 Epoch 30/40 63/63 [==============================] - 23s 366ms/step - loss: 1.1659 - acc: 0.6116 - val_loss: 1.0309 - val_acc: 0.6758 Epoch 31/40 63/63 [==============================] - 23s 366ms/step - loss: 1.1427 - acc: 0.6213 - val_loss: 1.0175 - val_acc: 0.6814 Epoch 32/40 63/63 [==============================] - 23s 367ms/step - loss: 1.1113 - acc: 0.6340 - val_loss: 1.0040 - val_acc: 0.6977 Epoch 33/40 63/63 [==============================] - 23s 365ms/step - loss: 1.0963 - acc: 0.6373 - val_loss: 0.9916 - val_acc: 0.6931 Epoch 34/40 63/63 [==============================] - 23s 366ms/step - loss: 1.0904 - acc: 0.6496 - val_loss: 0.9791 - val_acc: 0.6972 Epoch 35/40 63/63 [==============================] - 23s 366ms/step - loss: 1.0986 - acc: 0.6309 - val_loss: 0.9679 - val_acc: 0.7007 Epoch 36/40 63/63 [==============================] - 23s 366ms/step - loss: 1.0683 - acc: 0.6513 - val_loss: 0.9558 - val_acc: 0.7053 Epoch 37/40 63/63 [==============================] - 23s 367ms/step - loss: 1.0490 - acc: 0.6605 - val_loss: 0.9439 - val_acc: 0.7175 Epoch 38/40 63/63 [==============================] - 23s 368ms/step - loss: 1.0318 - acc: 0.6657 - val_loss: 0.9322 - val_acc: 0.7221 Epoch 39/40 63/63 [==============================] - 23s 367ms/step - loss: 1.0324 - acc: 0.6573 - val_loss: 0.9224 - val_acc: 0.7221 Epoch 40/40 63/63 [==============================] - 23s 367ms/step - loss: 1.0185 - acc: 0.6651 - val_loss: 0.9118 - val_acc: 0.7271
# creation of the model, using the resnet architecture and adding my own classes after the flattening layer
model3 = Sequential()
model3.add(vgg)
model3.add(Dense(512, activation='relu', input_dim= (224, 224, 3)))
model3.add(Dropout(0.3))
model3.add(Dense(512, activation='relu'))
model3.add(Dropout(0.3))
model3.add(Dense(num_classes, activation='softmax'))
# summary of the model
model3.summary()
# specifying a learning rate to optimizer adam
opt = tf.keras.optimizers.Adam(lr=0.000001)
# compiling the model
model3.compile(loss='categorical_crossentropy', optimizer=opt, metrics=['acc'])
# Fit the model
history = model3.fit(X, Y, validation_split=0.33, epochs=130, batch_size=64, verbose=1)
# summarize history for loss
plt.plot(history.history['loss'])
plt.plot(history.history['val_loss'])
plt.title('model loss')
plt.ylabel('loss')
plt.xlabel('epoch')
plt.legend(['train', 'test'], loc='upper right')
plt.show()
# summarize history for accuracy
plt.plot(history.history['acc'])
plt.plot(history.history['val_acc'])
plt.title('model accuracy')
plt.ylabel('accuracy')
plt.xlabel('epoch')
plt.legend(['train', 'test'], loc='upper right')
plt.show()
Model: "sequential_7" _________________________________________________________________ Layer (type) Output Shape Param # ================================================================= model (Functional) (None, 25088) 14714688 _________________________________________________________________ dense_23 (Dense) (None, 512) 12845568 _________________________________________________________________ dropout_16 (Dropout) (None, 512) 0 _________________________________________________________________ dense_24 (Dense) (None, 512) 262656 _________________________________________________________________ dropout_17 (Dropout) (None, 512) 0 _________________________________________________________________ dense_25 (Dense) (None, 8) 4104 ================================================================= Total params: 27,827,016 Trainable params: 13,112,328 Non-trainable params: 14,714,688 _________________________________________________________________ Epoch 1/130 63/63 [==============================] - 22s 346ms/step - loss: 2.2413 - acc: 0.1303 - val_loss: 1.8680 - val_acc: 0.3247 Epoch 2/130 63/63 [==============================] - 22s 350ms/step - loss: 1.9880 - acc: 0.2404 - val_loss: 1.7418 - val_acc: 0.3389 Epoch 3/130 63/63 [==============================] - 22s 355ms/step - loss: 1.8824 - acc: 0.2649 - val_loss: 1.6736 - val_acc: 0.3628 Epoch 4/130 63/63 [==============================] - 23s 360ms/step - loss: 1.8003 - acc: 0.3014 - val_loss: 1.6260 - val_acc: 0.4202 Epoch 5/130 63/63 [==============================] - 23s 364ms/step - loss: 1.7466 - acc: 0.3305 - val_loss: 1.5858 - val_acc: 0.4517 Epoch 6/130 63/63 [==============================] - 23s 372ms/step - loss: 1.6929 - acc: 0.3481 - val_loss: 1.5482 - val_acc: 0.4710 Epoch 7/130 63/63 [==============================] - 23s 365ms/step - loss: 1.6811 - acc: 0.3605 - val_loss: 1.5123 - val_acc: 0.4878 Epoch 8/130 63/63 [==============================] - 23s 363ms/step - loss: 1.6380 - acc: 0.3821 - val_loss: 1.4793 - val_acc: 0.5122 Epoch 9/130 63/63 [==============================] - 23s 365ms/step - loss: 1.6213 - acc: 0.3939 - val_loss: 1.4494 - val_acc: 0.5274 Epoch 10/130 63/63 [==============================] - 23s 368ms/step - loss: 1.5744 - acc: 0.4208 - val_loss: 1.4210 - val_acc: 0.5412 Epoch 11/130 63/63 [==============================] - 23s 368ms/step - loss: 1.5653 - acc: 0.4155 - val_loss: 1.3928 - val_acc: 0.5534 Epoch 12/130 63/63 [==============================] - 23s 366ms/step - loss: 1.5275 - acc: 0.4284 - val_loss: 1.3680 - val_acc: 0.5655 Epoch 13/130 63/63 [==============================] - 23s 366ms/step - loss: 1.4886 - acc: 0.4582 - val_loss: 1.3427 - val_acc: 0.5691 Epoch 14/130 63/63 [==============================] - 23s 366ms/step - loss: 1.4717 - acc: 0.4663 - val_loss: 1.3193 - val_acc: 0.5808 Epoch 15/130 63/63 [==============================] - 23s 367ms/step - loss: 1.4465 - acc: 0.4790 - val_loss: 1.2963 - val_acc: 0.5813 Epoch 16/130 63/63 [==============================] - 23s 368ms/step - loss: 1.3997 - acc: 0.4956 - val_loss: 1.2747 - val_acc: 0.5838 Epoch 17/130 63/63 [==============================] - 23s 367ms/step - loss: 1.3851 - acc: 0.5064 - val_loss: 1.2538 - val_acc: 0.5935 Epoch 18/130 63/63 [==============================] - 23s 367ms/step - loss: 1.3834 - acc: 0.5132 - val_loss: 1.2337 - val_acc: 0.5976 Epoch 19/130 63/63 [==============================] - 23s 368ms/step - loss: 1.3551 - acc: 0.5266 - val_loss: 1.2142 - val_acc: 0.6011 Epoch 20/130 63/63 [==============================] - 23s 368ms/step - loss: 1.3153 - acc: 0.5419 - val_loss: 1.1949 - val_acc: 0.6042 Epoch 21/130 63/63 [==============================] - 23s 366ms/step - loss: 1.3282 - acc: 0.5206 - val_loss: 1.1758 - val_acc: 0.6098 Epoch 22/130 63/63 [==============================] - 23s 368ms/step - loss: 1.2764 - acc: 0.5544 - val_loss: 1.1570 - val_acc: 0.6159 Epoch 23/130 63/63 [==============================] - 23s 366ms/step - loss: 1.2734 - acc: 0.5637 - val_loss: 1.1391 - val_acc: 0.6255 Epoch 24/130 63/63 [==============================] - 23s 367ms/step - loss: 1.2551 - acc: 0.5676 - val_loss: 1.1225 - val_acc: 0.6362 Epoch 25/130 63/63 [==============================] - 23s 367ms/step - loss: 1.1936 - acc: 0.5991 - val_loss: 1.1052 - val_acc: 0.6408 Epoch 26/130 63/63 [==============================] - 23s 368ms/step - loss: 1.2182 - acc: 0.5788 - val_loss: 1.0883 - val_acc: 0.6535 Epoch 27/130 63/63 [==============================] - 23s 365ms/step - loss: 1.1900 - acc: 0.5947 - val_loss: 1.0724 - val_acc: 0.6575 Epoch 28/130 63/63 [==============================] - 23s 366ms/step - loss: 1.1979 - acc: 0.5936 - val_loss: 1.0570 - val_acc: 0.6657 Epoch 29/130 63/63 [==============================] - 23s 366ms/step - loss: 1.1451 - acc: 0.6233 - val_loss: 1.0419 - val_acc: 0.6728 Epoch 30/130 63/63 [==============================] - 23s 367ms/step - loss: 1.1582 - acc: 0.6066 - val_loss: 1.0271 - val_acc: 0.6799 Epoch 31/130 63/63 [==============================] - 23s 367ms/step - loss: 1.1430 - acc: 0.6129 - val_loss: 1.0131 - val_acc: 0.6865 Epoch 32/130 63/63 [==============================] - 23s 367ms/step - loss: 1.1226 - acc: 0.6240 - val_loss: 1.0015 - val_acc: 0.6936 Epoch 33/130 63/63 [==============================] - 23s 365ms/step - loss: 1.0916 - acc: 0.6366 - val_loss: 0.9872 - val_acc: 0.6956 Epoch 34/130 63/63 [==============================] - 23s 365ms/step - loss: 1.1091 - acc: 0.6291 - val_loss: 0.9756 - val_acc: 0.7048 Epoch 35/130 63/63 [==============================] - 23s 368ms/step - loss: 1.1012 - acc: 0.6308 - val_loss: 0.9633 - val_acc: 0.7063 Epoch 36/130 63/63 [==============================] - 23s 367ms/step - loss: 1.0490 - acc: 0.6630 - val_loss: 0.9509 - val_acc: 0.7104 Epoch 37/130 63/63 [==============================] - 23s 365ms/step - loss: 1.0428 - acc: 0.6538 - val_loss: 0.9398 - val_acc: 0.7144 Epoch 38/130 63/63 [==============================] - 23s 366ms/step - loss: 1.0355 - acc: 0.6437 - val_loss: 0.9281 - val_acc: 0.7175 Epoch 39/130 63/63 [==============================] - 23s 367ms/step - loss: 1.0236 - acc: 0.6648 - val_loss: 0.9178 - val_acc: 0.7221 Epoch 40/130 63/63 [==============================] - 23s 366ms/step - loss: 1.0048 - acc: 0.6621 - val_loss: 0.9068 - val_acc: 0.7276 Epoch 41/130 63/63 [==============================] - 23s 367ms/step - loss: 1.0173 - acc: 0.6554 - val_loss: 0.8970 - val_acc: 0.7317 Epoch 42/130 63/63 [==============================] - 23s 367ms/step - loss: 0.9501 - acc: 0.6967 - val_loss: 0.8869 - val_acc: 0.7348 Epoch 43/130 63/63 [==============================] - 23s 367ms/step - loss: 0.9691 - acc: 0.6909 - val_loss: 0.8769 - val_acc: 0.7353 Epoch 44/130 63/63 [==============================] - 23s 366ms/step - loss: 0.9664 - acc: 0.6852 - val_loss: 0.8683 - val_acc: 0.7368 Epoch 45/130 63/63 [==============================] - 23s 365ms/step - loss: 0.9400 - acc: 0.7002 - val_loss: 0.8580 - val_acc: 0.7429 Epoch 46/130 63/63 [==============================] - 23s 366ms/step - loss: 0.9458 - acc: 0.6917 - val_loss: 0.8493 - val_acc: 0.7444 Epoch 47/130 63/63 [==============================] - 23s 365ms/step - loss: 0.9190 - acc: 0.7190 - val_loss: 0.8398 - val_acc: 0.7480 Epoch 48/130 63/63 [==============================] - 23s 365ms/step - loss: 0.9139 - acc: 0.7125 - val_loss: 0.8310 - val_acc: 0.7525 Epoch 49/130 63/63 [==============================] - 23s 366ms/step - loss: 0.9103 - acc: 0.7087 - val_loss: 0.8221 - val_acc: 0.7541 Epoch 50/130 63/63 [==============================] - 23s 366ms/step - loss: 0.9172 - acc: 0.7048 - val_loss: 0.8146 - val_acc: 0.7530 Epoch 51/130 63/63 [==============================] - 23s 366ms/step - loss: 0.8835 - acc: 0.7208 - val_loss: 0.8057 - val_acc: 0.7591 Epoch 52/130 63/63 [==============================] - 23s 367ms/step - loss: 0.8814 - acc: 0.7159 - val_loss: 0.7981 - val_acc: 0.7571 Epoch 53/130 63/63 [==============================] - 23s 367ms/step - loss: 0.8736 - acc: 0.7190 - val_loss: 0.7900 - val_acc: 0.7617 Epoch 54/130 63/63 [==============================] - 23s 367ms/step - loss: 0.8708 - acc: 0.7127 - val_loss: 0.7825 - val_acc: 0.7647 Epoch 55/130 63/63 [==============================] - 23s 368ms/step - loss: 0.8514 - acc: 0.7250 - val_loss: 0.7751 - val_acc: 0.7622 Epoch 56/130 63/63 [==============================] - 23s 367ms/step - loss: 0.8323 - acc: 0.7335 - val_loss: 0.7680 - val_acc: 0.7678 Epoch 57/130 63/63 [==============================] - 23s 367ms/step - loss: 0.8552 - acc: 0.7280 - val_loss: 0.7605 - val_acc: 0.7754 Epoch 58/130 63/63 [==============================] - 23s 367ms/step - loss: 0.8109 - acc: 0.7491 - val_loss: 0.7538 - val_acc: 0.7764 Epoch 59/130 63/63 [==============================] - 23s 367ms/step - loss: 0.8343 - acc: 0.7386 - val_loss: 0.7468 - val_acc: 0.7805 Epoch 60/130 63/63 [==============================] - 23s 368ms/step - loss: 0.7844 - acc: 0.7606 - val_loss: 0.7401 - val_acc: 0.7846 Epoch 61/130 63/63 [==============================] - 23s 366ms/step - loss: 0.8150 - acc: 0.7384 - val_loss: 0.7331 - val_acc: 0.7901 Epoch 62/130 63/63 [==============================] - 23s 367ms/step - loss: 0.8130 - acc: 0.7349 - val_loss: 0.7270 - val_acc: 0.7922 Epoch 63/130 63/63 [==============================] - 23s 366ms/step - loss: 0.7983 - acc: 0.7446 - val_loss: 0.7208 - val_acc: 0.7942 Epoch 64/130 63/63 [==============================] - 23s 366ms/step - loss: 0.7774 - acc: 0.7622 - val_loss: 0.7139 - val_acc: 0.7957 Epoch 65/130 63/63 [==============================] - 23s 367ms/step - loss: 0.7601 - acc: 0.7647 - val_loss: 0.7075 - val_acc: 0.7967 Epoch 66/130 63/63 [==============================] - 23s 367ms/step - loss: 0.7753 - acc: 0.7615 - val_loss: 0.7018 - val_acc: 0.7993 Epoch 67/130 63/63 [==============================] - 23s 366ms/step - loss: 0.7758 - acc: 0.7533 - val_loss: 0.6961 - val_acc: 0.7973 Epoch 68/130 63/63 [==============================] - 23s 368ms/step - loss: 0.7601 - acc: 0.7590 - val_loss: 0.6907 - val_acc: 0.7998 Epoch 69/130 63/63 [==============================] - 23s 368ms/step - loss: 0.7395 - acc: 0.7650 - val_loss: 0.6846 - val_acc: 0.8013 Epoch 70/130 63/63 [==============================] - 23s 368ms/step - loss: 0.7541 - acc: 0.7666 - val_loss: 0.6795 - val_acc: 0.8003 Epoch 71/130 63/63 [==============================] - 23s 368ms/step - loss: 0.7303 - acc: 0.7732 - val_loss: 0.6738 - val_acc: 0.8008 Epoch 72/130 63/63 [==============================] - 23s 367ms/step - loss: 0.7201 - acc: 0.7713 - val_loss: 0.6684 - val_acc: 0.8084 Epoch 73/130 63/63 [==============================] - 23s 367ms/step - loss: 0.7320 - acc: 0.7809 - val_loss: 0.6628 - val_acc: 0.8074 Epoch 74/130 63/63 [==============================] - 23s 367ms/step - loss: 0.7095 - acc: 0.7854 - val_loss: 0.6572 - val_acc: 0.8084 Epoch 75/130 63/63 [==============================] - 23s 367ms/step - loss: 0.7058 - acc: 0.7807 - val_loss: 0.6530 - val_acc: 0.8054 Epoch 76/130 63/63 [==============================] - 23s 368ms/step - loss: 0.7054 - acc: 0.7792 - val_loss: 0.6470 - val_acc: 0.8140 Epoch 77/130 63/63 [==============================] - 23s 368ms/step - loss: 0.6897 - acc: 0.7914 - val_loss: 0.6428 - val_acc: 0.8105 Epoch 78/130 63/63 [==============================] - 23s 367ms/step - loss: 0.6819 - acc: 0.7867 - val_loss: 0.6372 - val_acc: 0.8155 Epoch 79/130 63/63 [==============================] - 23s 367ms/step - loss: 0.6938 - acc: 0.7818 - val_loss: 0.6322 - val_acc: 0.8171 Epoch 80/130 63/63 [==============================] - 23s 368ms/step - loss: 0.6625 - acc: 0.7996 - val_loss: 0.6277 - val_acc: 0.8150 Epoch 81/130 63/63 [==============================] - 23s 367ms/step - loss: 0.6676 - acc: 0.7932 - val_loss: 0.6227 - val_acc: 0.8161 Epoch 82/130 63/63 [==============================] - 23s 368ms/step - loss: 0.6534 - acc: 0.8046 - val_loss: 0.6181 - val_acc: 0.8186 Epoch 83/130 63/63 [==============================] - 23s 368ms/step - loss: 0.6458 - acc: 0.8042 - val_loss: 0.6137 - val_acc: 0.8181 Epoch 84/130 63/63 [==============================] - 23s 368ms/step - loss: 0.6319 - acc: 0.8132 - val_loss: 0.6090 - val_acc: 0.8191 Epoch 85/130 63/63 [==============================] - 23s 368ms/step - loss: 0.6567 - acc: 0.7976 - val_loss: 0.6049 - val_acc: 0.8211 Epoch 86/130 63/63 [==============================] - 23s 367ms/step - loss: 0.6468 - acc: 0.8051 - val_loss: 0.6008 - val_acc: 0.8196 Epoch 87/130 63/63 [==============================] - 23s 367ms/step - loss: 0.6278 - acc: 0.8077 - val_loss: 0.5955 - val_acc: 0.8216 Epoch 88/130 63/63 [==============================] - 23s 368ms/step - loss: 0.6250 - acc: 0.8146 - val_loss: 0.5915 - val_acc: 0.8227 Epoch 89/130 63/63 [==============================] - 23s 368ms/step - loss: 0.6209 - acc: 0.8079 - val_loss: 0.5872 - val_acc: 0.8232 Epoch 90/130 63/63 [==============================] - 23s 367ms/step - loss: 0.6163 - acc: 0.8088 - val_loss: 0.5837 - val_acc: 0.8237 Epoch 91/130 63/63 [==============================] - 23s 368ms/step - loss: 0.6186 - acc: 0.8080 - val_loss: 0.5787 - val_acc: 0.8237 Epoch 92/130 63/63 [==============================] - 23s 368ms/step - loss: 0.6068 - acc: 0.8178 - val_loss: 0.5745 - val_acc: 0.8216 Epoch 93/130 63/63 [==============================] - 23s 368ms/step - loss: 0.6107 - acc: 0.8159 - val_loss: 0.5711 - val_acc: 0.8232 Epoch 94/130 63/63 [==============================] - 23s 368ms/step - loss: 0.6088 - acc: 0.8192 - val_loss: 0.5678 - val_acc: 0.8267 Epoch 95/130 63/63 [==============================] - 23s 367ms/step - loss: 0.6107 - acc: 0.8155 - val_loss: 0.5635 - val_acc: 0.8242 Epoch 96/130 63/63 [==============================] - 23s 367ms/step - loss: 0.5741 - acc: 0.8341 - val_loss: 0.5600 - val_acc: 0.8247 Epoch 97/130 63/63 [==============================] - 23s 368ms/step - loss: 0.5981 - acc: 0.8145 - val_loss: 0.5559 - val_acc: 0.8262 Epoch 98/130 63/63 [==============================] - 23s 367ms/step - loss: 0.5851 - acc: 0.8276 - val_loss: 0.5525 - val_acc: 0.8288 Epoch 99/130 63/63 [==============================] - 23s 368ms/step - loss: 0.5652 - acc: 0.8296 - val_loss: 0.5481 - val_acc: 0.8313 Epoch 100/130 63/63 [==============================] - 23s 368ms/step - loss: 0.5596 - acc: 0.8358 - val_loss: 0.5444 - val_acc: 0.8308 Epoch 101/130 63/63 [==============================] - 23s 368ms/step - loss: 0.5720 - acc: 0.8257 - val_loss: 0.5411 - val_acc: 0.8303 Epoch 102/130 63/63 [==============================] - 23s 368ms/step - loss: 0.5751 - acc: 0.8287 - val_loss: 0.5373 - val_acc: 0.8313 Epoch 103/130 63/63 [==============================] - 23s 367ms/step - loss: 0.5519 - acc: 0.8315 - val_loss: 0.5338 - val_acc: 0.8364 Epoch 104/130 63/63 [==============================] - 23s 368ms/step - loss: 0.5666 - acc: 0.8208 - val_loss: 0.5299 - val_acc: 0.8354 Epoch 105/130 63/63 [==============================] - 23s 367ms/step - loss: 0.5563 - acc: 0.8320 - val_loss: 0.5271 - val_acc: 0.8374 Epoch 106/130 63/63 [==============================] - 23s 368ms/step - loss: 0.5337 - acc: 0.8379 - val_loss: 0.5238 - val_acc: 0.8359 Epoch 107/130 63/63 [==============================] - 23s 368ms/step - loss: 0.5456 - acc: 0.8386 - val_loss: 0.5207 - val_acc: 0.8389 Epoch 108/130 63/63 [==============================] - 23s 368ms/step - loss: 0.5214 - acc: 0.8489 - val_loss: 0.5171 - val_acc: 0.8404 Epoch 109/130 63/63 [==============================] - 23s 367ms/step - loss: 0.5303 - acc: 0.8449 - val_loss: 0.5135 - val_acc: 0.8399 Epoch 110/130 63/63 [==============================] - 23s 367ms/step - loss: 0.5114 - acc: 0.8607 - val_loss: 0.5108 - val_acc: 0.8415 Epoch 111/130 63/63 [==============================] - 23s 367ms/step - loss: 0.5351 - acc: 0.8465 - val_loss: 0.5068 - val_acc: 0.8460 Epoch 112/130 63/63 [==============================] - 23s 368ms/step - loss: 0.5134 - acc: 0.8529 - val_loss: 0.5043 - val_acc: 0.8425 Epoch 113/130 63/63 [==============================] - 23s 367ms/step - loss: 0.5269 - acc: 0.8451 - val_loss: 0.5016 - val_acc: 0.8404 Epoch 114/130 63/63 [==============================] - 23s 367ms/step - loss: 0.5032 - acc: 0.8593 - val_loss: 0.4975 - val_acc: 0.8445 Epoch 115/130 63/63 [==============================] - 23s 368ms/step - loss: 0.5008 - acc: 0.8525 - val_loss: 0.4943 - val_acc: 0.8460 Epoch 116/130 63/63 [==============================] - 23s 368ms/step - loss: 0.4971 - acc: 0.8518 - val_loss: 0.4917 - val_acc: 0.8455 Epoch 117/130 63/63 [==============================] - 23s 367ms/step - loss: 0.5012 - acc: 0.8499 - val_loss: 0.4891 - val_acc: 0.8501 Epoch 118/130 63/63 [==============================] - 23s 368ms/step - loss: 0.5070 - acc: 0.8543 - val_loss: 0.4865 - val_acc: 0.8465 Epoch 119/130 63/63 [==============================] - 23s 368ms/step - loss: 0.4912 - acc: 0.8612 - val_loss: 0.4827 - val_acc: 0.8506 Epoch 120/130 63/63 [==============================] - 23s 367ms/step - loss: 0.4799 - acc: 0.8680 - val_loss: 0.4801 - val_acc: 0.8521 Epoch 121/130 63/63 [==============================] - 23s 367ms/step - loss: 0.4622 - acc: 0.8683 - val_loss: 0.4770 - val_acc: 0.8526 Epoch 122/130 63/63 [==============================] - 23s 368ms/step - loss: 0.4731 - acc: 0.8765 - val_loss: 0.4742 - val_acc: 0.8537 Epoch 123/130 63/63 [==============================] - 23s 368ms/step - loss: 0.4653 - acc: 0.8655 - val_loss: 0.4715 - val_acc: 0.8516 Epoch 124/130 63/63 [==============================] - 23s 367ms/step - loss: 0.4652 - acc: 0.8632 - val_loss: 0.4688 - val_acc: 0.8542 Epoch 125/130 63/63 [==============================] - 23s 368ms/step - loss: 0.4668 - acc: 0.8642 - val_loss: 0.4659 - val_acc: 0.8526 Epoch 126/130 63/63 [==============================] - 23s 366ms/step - loss: 0.4409 - acc: 0.8724 - val_loss: 0.4635 - val_acc: 0.8537 Epoch 127/130 63/63 [==============================] - 23s 368ms/step - loss: 0.4536 - acc: 0.8754 - val_loss: 0.4604 - val_acc: 0.8542 Epoch 128/130 63/63 [==============================] - 23s 368ms/step - loss: 0.4513 - acc: 0.8743 - val_loss: 0.4578 - val_acc: 0.8567 Epoch 129/130 63/63 [==============================] - 23s 367ms/step - loss: 0.4615 - acc: 0.8680 - val_loss: 0.4551 - val_acc: 0.8562 Epoch 130/130 63/63 [==============================] - 23s 368ms/step - loss: 0.4628 - acc: 0.8631 - val_loss: 0.4526 - val_acc: 0.8557
Prections
Angry
image1 = Image.open("/content/drive/MyDrive/images/unclassifiedImages/Angry/Angry1.jpg")
plt.imshow(image1)
plt.show()
rgbImage = image1.resize((224,224),Image.ANTIALIAS).convert('RGB')
plt.imshow(rgbImage)
plt.show()
Xt = []
Xt.append(np.array(rgbImage))
# Convert to NP array
Xt = np.array(Xt)
# Reshape 2D
Xt = Xt.reshape(Xt.shape[0], 224, 224, 3).astype('float32')
# Normalize the data
Xt = Xt /255
result = model3.predict_classes(Xt)
#result = np.argmax(modelC.predict(Xt))
plt.imshow(image1)
plt.show()
if result[0] == 1:
print("You are angry")
if result[0] == 2:
print("You are disgusted")
if result[0] == 3:
print("you are fear")
if result[0] == 4:
print("you are happy")
if result[0] == 5:
print("You are netural")
if result[0] == 6:
print("You are sad")
if result[0] == 7:
print("You are surprised")
/usr/local/lib/python3.7/dist-packages/tensorflow/python/keras/engine/sequential.py:450: UserWarning: `model.predict_classes()` is deprecated and will be removed after 2021-01-01. Please use instead:* `np.argmax(model.predict(x), axis=-1)`, if your model does multi-class classification (e.g. if it uses a `softmax` last-layer activation).* `(model.predict(x) > 0.5).astype("int32")`, if your model does binary classification (e.g. if it uses a `sigmoid` last-layer activation).
warnings.warn('`model.predict_classes()` is deprecated and '
You are surprised
image1 = Image.open("/content/drive/MyDrive/images/unclassifiedImages/Angry/Angry2.jpg")
plt.imshow(image1)
plt.show()
rgbImage = image1.resize((224,224),Image.ANTIALIAS).convert('RGB')
plt.imshow(rgbImage)
plt.show()
Xt = []
Xt.append(np.array(rgbImage))
# Convert to NP array
Xt = np.array(Xt)
# Reshape 2D
Xt = Xt.reshape(Xt.shape[0], 224, 224, 3).astype('float32')
# Normalize the data
Xt = Xt /255
result = model3.predict_classes(Xt)
#result = np.argmax(modelC.predict(Xt))
plt.imshow(image1)
plt.show()
if result[0] == 1:
print("You are angry")
if result[0] == 2:
print("You are disgusted")
if result[0] == 3:
print("you are fear")
if result[0] == 4:
print("you are happy")
if result[0] == 5:
print("You are netural")
if result[0] == 6:
print("You are sad")
if result[0] == 7:
print("You are surprised")
/usr/local/lib/python3.7/dist-packages/tensorflow/python/keras/engine/sequential.py:450: UserWarning: `model.predict_classes()` is deprecated and will be removed after 2021-01-01. Please use instead:* `np.argmax(model.predict(x), axis=-1)`, if your model does multi-class classification (e.g. if it uses a `softmax` last-layer activation).* `(model.predict(x) > 0.5).astype("int32")`, if your model does binary classification (e.g. if it uses a `sigmoid` last-layer activation).
warnings.warn('`model.predict_classes()` is deprecated and '
You are surprised
image1 = Image.open("/content/drive/MyDrive/images/unclassifiedImages/Angry/Angry3.jpg")
plt.imshow(image1)
plt.show()
rgbImage = image1.resize((224,224),Image.ANTIALIAS).convert('RGB')
plt.imshow(rgbImage)
plt.show()
Xt = []
Xt.append(np.array(rgbImage))
# Convert to NP array
Xt = np.array(Xt)
# Reshape 2D
Xt = Xt.reshape(Xt.shape[0], 224, 224, 3).astype('float32')
# Normalize the data
Xt = Xt /255
result = model3.predict_classes(Xt)
#result = np.argmax(modelC.predict(Xt))
plt.imshow(image1)
plt.show()
if result[0] == 1:
print("You are angry")
if result[0] == 2:
print("You are disgusted")
if result[0] == 3:
print("you are fear")
if result[0] == 4:
print("you are happy")
if result[0] == 5:
print("You are netural")
if result[0] == 6:
print("You are sad")
if result[0] == 7:
print("You are surprised")
/usr/local/lib/python3.7/dist-packages/tensorflow/python/keras/engine/sequential.py:450: UserWarning: `model.predict_classes()` is deprecated and will be removed after 2021-01-01. Please use instead:* `np.argmax(model.predict(x), axis=-1)`, if your model does multi-class classification (e.g. if it uses a `softmax` last-layer activation).* `(model.predict(x) > 0.5).astype("int32")`, if your model does binary classification (e.g. if it uses a `sigmoid` last-layer activation).
warnings.warn('`model.predict_classes()` is deprecated and '
You are surprised
image1 = Image.open("/content/drive/MyDrive/images/unclassifiedImages/Angry/Angry4.jpg")
plt.imshow(image1)
plt.show()
rgbImage = image1.resize((224,224),Image.ANTIALIAS).convert('RGB')
plt.imshow(rgbImage)
plt.show()
Xt = []
Xt.append(np.array(rgbImage))
# Convert to NP array
Xt = np.array(Xt)
# Reshape 2D
Xt = Xt.reshape(Xt.shape[0], 224, 224, 3).astype('float32')
# Normalize the data
Xt = Xt /255
result = model3.predict_classes(Xt)
#result = np.argmax(modelC.predict(Xt))
plt.imshow(image1)
plt.show()
if result[0] == 1:
print("You are angry")
if result[0] == 2:
print("You are disgusted")
if result[0] == 3:
print("you are fear")
if result[0] == 4:
print("you are happy")
if result[0] == 5:
print("You are netural")
if result[0] == 6:
print("You are sad")
if result[0] == 7:
print("You are surprised")
/usr/local/lib/python3.7/dist-packages/tensorflow/python/keras/engine/sequential.py:450: UserWarning: `model.predict_classes()` is deprecated and will be removed after 2021-01-01. Please use instead:* `np.argmax(model.predict(x), axis=-1)`, if your model does multi-class classification (e.g. if it uses a `softmax` last-layer activation).* `(model.predict(x) > 0.5).astype("int32")`, if your model does binary classification (e.g. if it uses a `sigmoid` last-layer activation).
warnings.warn('`model.predict_classes()` is deprecated and '
you are fear
image1 = Image.open("/content/drive/MyDrive/images/unclassifiedImages/Angry/Angry5.jpg")
plt.imshow(image1)
plt.show()
rgbImage = image1.resize((224,224),Image.ANTIALIAS).convert('RGB')
plt.imshow(rgbImage)
plt.show()
Xt = []
Xt.append(np.array(rgbImage))
# Convert to NP array
Xt = np.array(Xt)
# Reshape 2D
Xt = Xt.reshape(Xt.shape[0], 224, 224, 3).astype('float32')
# Normalize the data
Xt = Xt /255
result = model3.predict_classes(Xt)
#result = np.argmax(modelC.predict(Xt))
plt.imshow(image1)
plt.show()
if result[0] == 1:
print("You are angry")
if result[0] == 2:
print("You are disgusted")
if result[0] == 3:
print("you are fear")
if result[0] == 4:
print("you are happy")
if result[0] == 5:
print("You are netural")
if result[0] == 6:
print("You are sad")
if result[0] == 7:
print("You are surprised")
/usr/local/lib/python3.7/dist-packages/tensorflow/python/keras/engine/sequential.py:450: UserWarning: `model.predict_classes()` is deprecated and will be removed after 2021-01-01. Please use instead:* `np.argmax(model.predict(x), axis=-1)`, if your model does multi-class classification (e.g. if it uses a `softmax` last-layer activation).* `(model.predict(x) > 0.5).astype("int32")`, if your model does binary classification (e.g. if it uses a `sigmoid` last-layer activation).
warnings.warn('`model.predict_classes()` is deprecated and '
You are surprised
image1 = Image.open("/content/drive/MyDrive/images/unclassifiedImages/Angry/Angry6.jpg")
plt.imshow(image1)
plt.show()
rgbImage = image1.resize((224,224),Image.ANTIALIAS).convert('RGB')
plt.imshow(rgbImage)
plt.show()
Xt = []
Xt.append(np.array(rgbImage))
# Convert to NP array
Xt = np.array(Xt)
# Reshape 2D
Xt = Xt.reshape(Xt.shape[0], 224, 224, 3).astype('float32')
# Normalize the data
Xt = Xt /255
result = model3.predict_classes(Xt)
#result = np.argmax(modelC.predict(Xt))
plt.imshow(image1)
plt.show()
if result[0] == 1:
print("You are angry")
if result[0] == 2:
print("You are disgusted")
if result[0] == 3:
print("you are fear")
if result[0] == 4:
print("you are happy")
if result[0] == 5:
print("You are netural")
if result[0] == 6:
print("You are sad")
if result[0] == 7:
print("You are surprised")
/usr/local/lib/python3.7/dist-packages/tensorflow/python/keras/engine/sequential.py:450: UserWarning: `model.predict_classes()` is deprecated and will be removed after 2021-01-01. Please use instead:* `np.argmax(model.predict(x), axis=-1)`, if your model does multi-class classification (e.g. if it uses a `softmax` last-layer activation).* `(model.predict(x) > 0.5).astype("int32")`, if your model does binary classification (e.g. if it uses a `sigmoid` last-layer activation).
warnings.warn('`model.predict_classes()` is deprecated and '
You are surprised
image1 = Image.open("/content/drive/MyDrive/images/unclassifiedImages/Angry/Angry7.jpg")
plt.imshow(image1)
plt.show()
rgbImage = image1.resize((224,224),Image.ANTIALIAS).convert('RGB')
plt.imshow(rgbImage)
plt.show()
Xt = []
Xt.append(np.array(rgbImage))
# Convert to NP array
Xt = np.array(Xt)
# Reshape 2D
Xt = Xt.reshape(Xt.shape[0], 224, 224, 3).astype('float32')
# Normalize the data
Xt = Xt /255
result = model3.predict_classes(Xt)
#result = np.argmax(modelC.predict(Xt))
plt.imshow(image1)
plt.show()
if result[0] == 1:
print("You are angry")
if result[0] == 2:
print("You are disgusted")
if result[0] == 3:
print("you are fear")
if result[0] == 4:
print("you are happy")
if result[0] == 5:
print("You are netural")
if result[0] == 6:
print("You are sad")
if result[0] == 7:
print("You are surprised")
/usr/local/lib/python3.7/dist-packages/tensorflow/python/keras/engine/sequential.py:450: UserWarning: `model.predict_classes()` is deprecated and will be removed after 2021-01-01. Please use instead:* `np.argmax(model.predict(x), axis=-1)`, if your model does multi-class classification (e.g. if it uses a `softmax` last-layer activation).* `(model.predict(x) > 0.5).astype("int32")`, if your model does binary classification (e.g. if it uses a `sigmoid` last-layer activation).
warnings.warn('`model.predict_classes()` is deprecated and '
You are surprised
image1 = Image.open("/content/drive/MyDrive/images/unclassifiedImages/Angry/Angry8.jpg")
plt.imshow(image1)
plt.show()
rgbImage = image1.resize((224,224),Image.ANTIALIAS).convert('RGB')
plt.imshow(rgbImage)
plt.show()
Xt = []
Xt.append(np.array(rgbImage))
# Convert to NP array
Xt = np.array(Xt)
# Reshape 2D
Xt = Xt.reshape(Xt.shape[0], 224, 224, 3).astype('float32')
# Normalize the data
Xt = Xt /255
result = model3.predict_classes(Xt)
#result = np.argmax(modelC.predict(Xt))
plt.imshow(image1)
plt.show()
if result[0] == 1:
print("You are angry")
if result[0] == 2:
print("You are disgusted")
if result[0] == 3:
print("you are fear")
if result[0] == 4:
print("you are happy")
if result[0] == 5:
print("You are netural")
if result[0] == 6:
print("You are sad")
if result[0] == 7:
print("You are surprised")
/usr/local/lib/python3.7/dist-packages/tensorflow/python/keras/engine/sequential.py:450: UserWarning: `model.predict_classes()` is deprecated and will be removed after 2021-01-01. Please use instead:* `np.argmax(model.predict(x), axis=-1)`, if your model does multi-class classification (e.g. if it uses a `softmax` last-layer activation).* `(model.predict(x) > 0.5).astype("int32")`, if your model does binary classification (e.g. if it uses a `sigmoid` last-layer activation).
warnings.warn('`model.predict_classes()` is deprecated and '
You are surprised
image1 = Image.open("/content/drive/MyDrive/images/unclassifiedImages/Angry/Angry9.jpg")
plt.imshow(image1)
plt.show()
rgbImage = image1.resize((224,224),Image.ANTIALIAS).convert('RGB')
plt.imshow(rgbImage)
plt.show()
Xt = []
Xt.append(np.array(rgbImage))
# Convert to NP array
Xt = np.array(Xt)
# Reshape 2D
Xt = Xt.reshape(Xt.shape[0], 224, 224, 3).astype('float32')
# Normalize the data
Xt = Xt /255
result = model3.predict_classes(Xt)
#result = np.argmax(modelC.predict(Xt))
plt.imshow(image1)
plt.show()
if result[0] == 1:
print("You are angry")
if result[0] == 2:
print("You are disgusted")
if result[0] == 3:
print("you are fear")
if result[0] == 4:
print("you are happy")
if result[0] == 5:
print("You are netural")
if result[0] == 6:
print("You are sad")
if result[0] == 7:
print("You are surprised")
/usr/local/lib/python3.7/dist-packages/tensorflow/python/keras/engine/sequential.py:450: UserWarning: `model.predict_classes()` is deprecated and will be removed after 2021-01-01. Please use instead:* `np.argmax(model.predict(x), axis=-1)`, if your model does multi-class classification (e.g. if it uses a `softmax` last-layer activation).* `(model.predict(x) > 0.5).astype("int32")`, if your model does binary classification (e.g. if it uses a `sigmoid` last-layer activation).
warnings.warn('`model.predict_classes()` is deprecated and '
you are fear
image1 = Image.open("/content/drive/MyDrive/images/unclassifiedImages/Angry/Angry10.jpg")
plt.imshow(image1)
plt.show()
rgbImage = image1.resize((224,224),Image.ANTIALIAS).convert('RGB')
plt.imshow(rgbImage)
plt.show()
Xt = []
Xt.append(np.array(rgbImage))
# Convert to NP array
Xt = np.array(Xt)
# Reshape 2D
Xt = Xt.reshape(Xt.shape[0], 224, 224, 3).astype('float32')
# Normalize the data
Xt = Xt /255
result = model3.predict_classes(Xt)
#result = np.argmax(modelC.predict(Xt))
plt.imshow(image1)
plt.show()
if result[0] == 1:
print("You are angry")
if result[0] == 2:
print("You are disgusted")
if result[0] == 3:
print("you are fear")
if result[0] == 4:
print("you are happy")
if result[0] == 5:
print("You are netural")
if result[0] == 6:
print("You are sad")
if result[0] == 7:
print("You are surprised")
/usr/local/lib/python3.7/dist-packages/tensorflow/python/keras/engine/sequential.py:450: UserWarning: `model.predict_classes()` is deprecated and will be removed after 2021-01-01. Please use instead:* `np.argmax(model.predict(x), axis=-1)`, if your model does multi-class classification (e.g. if it uses a `softmax` last-layer activation).* `(model.predict(x) > 0.5).astype("int32")`, if your model does binary classification (e.g. if it uses a `sigmoid` last-layer activation).
warnings.warn('`model.predict_classes()` is deprecated and '
you are fear
image1 = Image.open("/content/drive/MyDrive/images/unclassifiedImages/Angry/Angry11.jpg")
plt.imshow(image1)
plt.show()
rgbImage = image1.resize((224,224),Image.ANTIALIAS).convert('RGB')
plt.imshow(rgbImage)
plt.show()
Xt = []
Xt.append(np.array(rgbImage))
# Convert to NP array
Xt = np.array(Xt)
# Reshape 2D
Xt = Xt.reshape(Xt.shape[0], 224, 224, 3).astype('float32')
# Normalize the data
Xt = Xt /255
result = model3.predict_classes(Xt)
#result = np.argmax(modelC.predict(Xt))
plt.imshow(image1)
plt.show()
if result[0] == 1:
print("You are angry")
if result[0] == 2:
print("You are disgusted")
if result[0] == 3:
print("you are fear")
if result[0] == 4:
print("you are happy")
if result[0] == 5:
print("You are netural")
if result[0] == 6:
print("You are sad")
if result[0] == 7:
print("You are surprised")
/usr/local/lib/python3.7/dist-packages/tensorflow/python/keras/engine/sequential.py:450: UserWarning: `model.predict_classes()` is deprecated and will be removed after 2021-01-01. Please use instead:* `np.argmax(model.predict(x), axis=-1)`, if your model does multi-class classification (e.g. if it uses a `softmax` last-layer activation).* `(model.predict(x) > 0.5).astype("int32")`, if your model does binary classification (e.g. if it uses a `sigmoid` last-layer activation).
warnings.warn('`model.predict_classes()` is deprecated and '
you are fear
image1 = Image.open("/content/drive/MyDrive/images/unclassifiedImages/Angry/Angry12.jpg")
plt.imshow(image1)
plt.show()
rgbImage = image1.resize((224,224),Image.ANTIALIAS).convert('RGB')
plt.imshow(rgbImage)
plt.show()
Xt = []
Xt.append(np.array(rgbImage))
# Convert to NP array
Xt = np.array(Xt)
# Reshape 2D
Xt = Xt.reshape(Xt.shape[0], 224, 224, 3).astype('float32')
# Normalize the data
Xt = Xt /255
result = model3.predict_classes(Xt)
#result = np.argmax(modelC.predict(Xt))
plt.imshow(image1)
plt.show()
if result[0] == 1:
print("You are angry")
if result[0] == 2:
print("You are disgusted")
if result[0] == 3:
print("you are fear")
if result[0] == 4:
print("you are happy")
if result[0] == 5:
print("You are netural")
if result[0] == 6:
print("You are sad")
if result[0] == 7:
print("You are surprised")
/usr/local/lib/python3.7/dist-packages/tensorflow/python/keras/engine/sequential.py:450: UserWarning: `model.predict_classes()` is deprecated and will be removed after 2021-01-01. Please use instead:* `np.argmax(model.predict(x), axis=-1)`, if your model does multi-class classification (e.g. if it uses a `softmax` last-layer activation).* `(model.predict(x) > 0.5).astype("int32")`, if your model does binary classification (e.g. if it uses a `sigmoid` last-layer activation).
warnings.warn('`model.predict_classes()` is deprecated and '
You are surprised
image1 = Image.open("/content/drive/MyDrive/images/unclassifiedImages/Angry/Angry13.jpg")
plt.imshow(image1)
plt.show()
rgbImage = image1.resize((224,224),Image.ANTIALIAS).convert('RGB')
plt.imshow(rgbImage)
plt.show()
Xt = []
Xt.append(np.array(rgbImage))
# Convert to NP array
Xt = np.array(Xt)
# Reshape 2D
Xt = Xt.reshape(Xt.shape[0], 224, 224, 3).astype('float32')
# Normalize the data
Xt = Xt /255
result = model3.predict_classes(Xt)
#result = np.argmax(modelC.predict(Xt))
plt.imshow(image1)
plt.show()
if result[0] == 1:
print("You are angry")
if result[0] == 2:
print("You are disgusted")
if result[0] == 3:
print("you are fear")
if result[0] == 4:
print("you are happy")
if result[0] == 5:
print("You are netural")
if result[0] == 6:
print("You are sad")
if result[0] == 7:
print("You are surprised")
/usr/local/lib/python3.7/dist-packages/tensorflow/python/keras/engine/sequential.py:450: UserWarning: `model.predict_classes()` is deprecated and will be removed after 2021-01-01. Please use instead:* `np.argmax(model.predict(x), axis=-1)`, if your model does multi-class classification (e.g. if it uses a `softmax` last-layer activation).* `(model.predict(x) > 0.5).astype("int32")`, if your model does binary classification (e.g. if it uses a `sigmoid` last-layer activation).
warnings.warn('`model.predict_classes()` is deprecated and '
You are surprised
image1 = Image.open("/content/drive/MyDrive/images/unclassifiedImages/Angry/Angry14.jpg")
plt.imshow(image1)
plt.show()
rgbImage = image1.resize((224,224),Image.ANTIALIAS).convert('RGB')
plt.imshow(rgbImage)
plt.show()
Xt = []
Xt.append(np.array(rgbImage))
# Convert to NP array
Xt = np.array(Xt)
# Reshape 2D
Xt = Xt.reshape(Xt.shape[0], 224, 224, 3).astype('float32')
# Normalize the data
Xt = Xt /255
result = model3.predict_classes(Xt)
#result = np.argmax(modelC.predict(Xt))
plt.imshow(image1)
plt.show()
if result[0] == 1:
print("You are angry")
if result[0] == 2:
print("You are disgusted")
if result[0] == 3:
print("you are fear")
if result[0] == 4:
print("you are happy")
if result[0] == 5:
print("You are netural")
if result[0] == 6:
print("You are sad")
if result[0] == 7:
print("You are surprised")
/usr/local/lib/python3.7/dist-packages/tensorflow/python/keras/engine/sequential.py:450: UserWarning: `model.predict_classes()` is deprecated and will be removed after 2021-01-01. Please use instead:* `np.argmax(model.predict(x), axis=-1)`, if your model does multi-class classification (e.g. if it uses a `softmax` last-layer activation).* `(model.predict(x) > 0.5).astype("int32")`, if your model does binary classification (e.g. if it uses a `sigmoid` last-layer activation).
warnings.warn('`model.predict_classes()` is deprecated and '
You are surprised
image1 = Image.open("/content/drive/MyDrive/images/unclassifiedImages/Angry/Angry15.jpg")
plt.imshow(image1)
plt.show()
rgbImage = image1.resize((224,224),Image.ANTIALIAS).convert('RGB')
plt.imshow(rgbImage)
plt.show()
Xt = []
Xt.append(np.array(rgbImage))
# Convert to NP array
Xt = np.array(Xt)
# Reshape 2D
Xt = Xt.reshape(Xt.shape[0], 224, 224, 3).astype('float32')
# Normalize the data
Xt = Xt /255
result = model3.predict_classes(Xt)
#result = np.argmax(modelC.predict(Xt))
plt.imshow(image1)
plt.show()
if result[0] == 1:
print("You are angry")
if result[0] == 2:
print("You are disgusted")
if result[0] == 3:
print("you are fear")
if result[0] == 4:
print("you are happy")
if result[0] == 5:
print("You are netural")
if result[0] == 6:
print("You are sad")
if result[0] == 7:
print("You are surprised")
/usr/local/lib/python3.7/dist-packages/tensorflow/python/keras/engine/sequential.py:450: UserWarning: `model.predict_classes()` is deprecated and will be removed after 2021-01-01. Please use instead:* `np.argmax(model.predict(x), axis=-1)`, if your model does multi-class classification (e.g. if it uses a `softmax` last-layer activation).* `(model.predict(x) > 0.5).astype("int32")`, if your model does binary classification (e.g. if it uses a `sigmoid` last-layer activation).
warnings.warn('`model.predict_classes()` is deprecated and '
You are surprised
image1 = Image.open("/content/drive/MyDrive/images/unclassifiedImages/Angry/Angry16.jpg")
plt.imshow(image1)
plt.show()
rgbImage = image1.resize((224,224),Image.ANTIALIAS).convert('RGB')
plt.imshow(rgbImage)
plt.show()
Xt = []
Xt.append(np.array(rgbImage))
# Convert to NP array
Xt = np.array(Xt)
# Reshape 2D
Xt = Xt.reshape(Xt.shape[0], 224, 224, 3).astype('float32')
# Normalize the data
Xt = Xt /255
result = model3.predict_classes(Xt)
#result = np.argmax(modelC.predict(Xt))
plt.imshow(image1)
plt.show()
if result[0] == 1:
print("You are angry")
if result[0] == 2:
print("You are disgusted")
if result[0] == 3:
print("you are fear")
if result[0] == 4:
print("you are happy")
if result[0] == 5:
print("You are netural")
if result[0] == 6:
print("You are sad")
if result[0] == 7:
print("You are surprised")
/usr/local/lib/python3.7/dist-packages/tensorflow/python/keras/engine/sequential.py:450: UserWarning: `model.predict_classes()` is deprecated and will be removed after 2021-01-01. Please use instead:* `np.argmax(model.predict(x), axis=-1)`, if your model does multi-class classification (e.g. if it uses a `softmax` last-layer activation).* `(model.predict(x) > 0.5).astype("int32")`, if your model does binary classification (e.g. if it uses a `sigmoid` last-layer activation).
warnings.warn('`model.predict_classes()` is deprecated and '
You are surprised
image1 = Image.open("/content/drive/MyDrive/images/unclassifiedImages/Angry/Angry17.jpg")
plt.imshow(image1)
plt.show()
rgbImage = image1.resize((224,224),Image.ANTIALIAS).convert('RGB')
plt.imshow(rgbImage)
plt.show()
Xt = []
Xt.append(np.array(rgbImage))
# Convert to NP array
Xt = np.array(Xt)
# Reshape 2D
Xt = Xt.reshape(Xt.shape[0], 224, 224, 3).astype('float32')
# Normalize the data
Xt = Xt /255
result = model3.predict_classes(Xt)
#result = np.argmax(modelC.predict(Xt))
plt.imshow(image1)
plt.show()
if result[0] == 1:
print("You are angry")
if result[0] == 2:
print("You are disgusted")
if result[0] == 3:
print("you are fear")
if result[0] == 4:
print("you are happy")
if result[0] == 5:
print("You are netural")
if result[0] == 6:
print("You are sad")
if result[0] == 7:
print("You are surprised")
/usr/local/lib/python3.7/dist-packages/tensorflow/python/keras/engine/sequential.py:450: UserWarning: `model.predict_classes()` is deprecated and will be removed after 2021-01-01. Please use instead:* `np.argmax(model.predict(x), axis=-1)`, if your model does multi-class classification (e.g. if it uses a `softmax` last-layer activation).* `(model.predict(x) > 0.5).astype("int32")`, if your model does binary classification (e.g. if it uses a `sigmoid` last-layer activation).
warnings.warn('`model.predict_classes()` is deprecated and '
you are fear
image1 = Image.open("/content/drive/MyDrive/images/unclassifiedImages/Angry/Angry18.jpg")
plt.imshow(image1)
plt.show()
rgbImage = image1.resize((224,224),Image.ANTIALIAS).convert('RGB')
plt.imshow(rgbImage)
plt.show()
Xt = []
Xt.append(np.array(rgbImage))
# Convert to NP array
Xt = np.array(Xt)
# Reshape 2D
Xt = Xt.reshape(Xt.shape[0], 224, 224, 3).astype('float32')
# Normalize the data
Xt = Xt /255
result = model3.predict_classes(Xt)
#result = np.argmax(modelC.predict(Xt))
plt.imshow(image1)
plt.show()
if result[0] == 1:
print("You are angry")
if result[0] == 2:
print("You are disgusted")
if result[0] == 3:
print("you are fear")
if result[0] == 4:
print("you are happy")
if result[0] == 5:
print("You are netural")
if result[0] == 6:
print("You are sad")
if result[0] == 7:
print("You are surprised")
/usr/local/lib/python3.7/dist-packages/tensorflow/python/keras/engine/sequential.py:450: UserWarning: `model.predict_classes()` is deprecated and will be removed after 2021-01-01. Please use instead:* `np.argmax(model.predict(x), axis=-1)`, if your model does multi-class classification (e.g. if it uses a `softmax` last-layer activation).* `(model.predict(x) > 0.5).astype("int32")`, if your model does binary classification (e.g. if it uses a `sigmoid` last-layer activation).
warnings.warn('`model.predict_classes()` is deprecated and '
you are fear
image1 = Image.open("/content/drive/MyDrive/images/unclassifiedImages/Angry/Angry19.jpg")
plt.imshow(image1)
plt.show()
rgbImage = image1.resize((224,224),Image.ANTIALIAS).convert('RGB')
plt.imshow(rgbImage)
plt.show()
Xt = []
Xt.append(np.array(rgbImage))
# Convert to NP array
Xt = np.array(Xt)
# Reshape 2D
Xt = Xt.reshape(Xt.shape[0], 224, 224, 3).astype('float32')
# Normalize the data
Xt = Xt /255
result = model3.predict_classes(Xt)
#result = np.argmax(modelC.predict(Xt))
plt.imshow(image1)
plt.show()
if result[0] == 1:
print("You are angry")
if result[0] == 2:
print("You are disgusted")
if result[0] == 3:
print("you are fear")
if result[0] == 4:
print("you are happy")
if result[0] == 5:
print("You are netural")
if result[0] == 6:
print("You are sad")
if result[0] == 7:
print("You are surprised")
/usr/local/lib/python3.7/dist-packages/tensorflow/python/keras/engine/sequential.py:450: UserWarning: `model.predict_classes()` is deprecated and will be removed after 2021-01-01. Please use instead:* `np.argmax(model.predict(x), axis=-1)`, if your model does multi-class classification (e.g. if it uses a `softmax` last-layer activation).* `(model.predict(x) > 0.5).astype("int32")`, if your model does binary classification (e.g. if it uses a `sigmoid` last-layer activation).
warnings.warn('`model.predict_classes()` is deprecated and '
You are surprised
image1 = Image.open("/content/drive/MyDrive/images/unclassifiedImages/Angry/Angry20.jpg")
plt.imshow(image1)
plt.show()
rgbImage = image1.resize((224,224),Image.ANTIALIAS).convert('RGB')
plt.imshow(rgbImage)
plt.show()
Xt = []
Xt.append(np.array(rgbImage))
# Convert to NP array
Xt = np.array(Xt)
# Reshape 2D
Xt = Xt.reshape(Xt.shape[0], 224, 224, 3).astype('float32')
# Normalize the data
Xt = Xt /255
result = model3.predict_classes(Xt)
#result = np.argmax(modelC.predict(Xt))
plt.imshow(image1)
plt.show()
if result[0] == 1:
print("You are angry")
if result[0] == 2:
print("You are disgusted")
if result[0] == 3:
print("you are fear")
if result[0] == 4:
print("you are happy")
if result[0] == 5:
print("You are netural")
if result[0] == 6:
print("You are sad")
if result[0] == 7:
print("You are surprised")
/usr/local/lib/python3.7/dist-packages/tensorflow/python/keras/engine/sequential.py:450: UserWarning: `model.predict_classes()` is deprecated and will be removed after 2021-01-01. Please use instead:* `np.argmax(model.predict(x), axis=-1)`, if your model does multi-class classification (e.g. if it uses a `softmax` last-layer activation).* `(model.predict(x) > 0.5).astype("int32")`, if your model does binary classification (e.g. if it uses a `sigmoid` last-layer activation).
warnings.warn('`model.predict_classes()` is deprecated and '
you are fear
Disgust
image1 = Image.open("/content/drive/MyDrive/images/unclassifiedImages/Disgust/Disgust1.jpg")
plt.imshow(image1)
plt.show()
rgbImage = image1.resize((224,224),Image.ANTIALIAS).convert('RGB')
plt.imshow(rgbImage)
plt.show()
Xt = []
Xt.append(np.array(rgbImage))
# Convert to NP array
Xt = np.array(Xt)
# Reshape 2D
Xt = Xt.reshape(Xt.shape[0], 224, 224, 3).astype('float32')
# Normalize the data
Xt = Xt /255
result = model3.predict_classes(Xt)
#result = np.argmax(modelC.predict(Xt))
plt.imshow(image1)
plt.show()
if result[0] == 1:
print("You are angry")
if result[0] == 2:
print("You are disgusted")
if result[0] == 3:
print("you are fear")
if result[0] == 4:
print("you are happy")
if result[0] == 5:
print("You are netural")
if result[0] == 6:
print("You are sad")
if result[0] == 7:
print("You are surprised")
/usr/local/lib/python3.7/dist-packages/tensorflow/python/keras/engine/sequential.py:450: UserWarning: `model.predict_classes()` is deprecated and will be removed after 2021-01-01. Please use instead:* `np.argmax(model.predict(x), axis=-1)`, if your model does multi-class classification (e.g. if it uses a `softmax` last-layer activation).* `(model.predict(x) > 0.5).astype("int32")`, if your model does binary classification (e.g. if it uses a `sigmoid` last-layer activation).
warnings.warn('`model.predict_classes()` is deprecated and '
you are fear
image1 = Image.open("/content/drive/MyDrive/images/unclassifiedImages/Disgust/Disgust2.jpg")
plt.imshow(image1)
plt.show()
rgbImage = image1.resize((224,224),Image.ANTIALIAS).convert('RGB')
plt.imshow(rgbImage)
plt.show()
Xt = []
Xt.append(np.array(rgbImage))
# Convert to NP array
Xt = np.array(Xt)
# Reshape 2D
Xt = Xt.reshape(Xt.shape[0], 224, 224, 3).astype('float32')
# Normalize the data
Xt = Xt /255
result = model3.predict_classes(Xt)
#result = np.argmax(modelC.predict(Xt))
plt.imshow(image1)
plt.show()
if result[0] == 1:
print("You are angry")
if result[0] == 2:
print("You are disgusted")
if result[0] == 3:
print("you are fear")
if result[0] == 4:
print("you are happy")
if result[0] == 5:
print("You are netural")
if result[0] == 6:
print("You are sad")
if result[0] == 7:
print("You are surprised")
/usr/local/lib/python3.7/dist-packages/tensorflow/python/keras/engine/sequential.py:450: UserWarning: `model.predict_classes()` is deprecated and will be removed after 2021-01-01. Please use instead:* `np.argmax(model.predict(x), axis=-1)`, if your model does multi-class classification (e.g. if it uses a `softmax` last-layer activation).* `(model.predict(x) > 0.5).astype("int32")`, if your model does binary classification (e.g. if it uses a `sigmoid` last-layer activation).
warnings.warn('`model.predict_classes()` is deprecated and '
you are happy
image1 = Image.open("/content/drive/MyDrive/images/unclassifiedImages/Disgust/Disgust3.jpg")
plt.imshow(image1)
plt.show()
rgbImage = image1.resize((224,224),Image.ANTIALIAS).convert('RGB')
plt.imshow(rgbImage)
plt.show()
Xt = []
Xt.append(np.array(rgbImage))
# Convert to NP array
Xt = np.array(Xt)
# Reshape 2D
Xt = Xt.reshape(Xt.shape[0], 224, 224, 3).astype('float32')
# Normalize the data
Xt = Xt /255
result = model3.predict_classes(Xt)
#result = np.argmax(modelC.predict(Xt))
plt.imshow(image1)
plt.show()
if result[0] == 1:
print("You are angry")
if result[0] == 2:
print("You are disgusted")
if result[0] == 3:
print("you are fear")
if result[0] == 4:
print("you are happy")
if result[0] == 5:
print("You are netural")
if result[0] == 6:
print("You are sad")
if result[0] == 7:
print("You are surprised")
/usr/local/lib/python3.7/dist-packages/tensorflow/python/keras/engine/sequential.py:450: UserWarning: `model.predict_classes()` is deprecated and will be removed after 2021-01-01. Please use instead:* `np.argmax(model.predict(x), axis=-1)`, if your model does multi-class classification (e.g. if it uses a `softmax` last-layer activation).* `(model.predict(x) > 0.5).astype("int32")`, if your model does binary classification (e.g. if it uses a `sigmoid` last-layer activation).
warnings.warn('`model.predict_classes()` is deprecated and '
you are fear
image1 = Image.open("/content/drive/MyDrive/images/unclassifiedImages/Disgust/Disgust4.jpg")
plt.imshow(image1)
plt.show()
rgbImage = image1.resize((224,224),Image.ANTIALIAS).convert('RGB')
plt.imshow(rgbImage)
plt.show()
Xt = []
Xt.append(np.array(rgbImage))
# Convert to NP array
Xt = np.array(Xt)
# Reshape 2D
Xt = Xt.reshape(Xt.shape[0], 224, 224, 3).astype('float32')
# Normalize the data
Xt = Xt /255
result = model3.predict_classes(Xt)
#result = np.argmax(modelC.predict(Xt))
plt.imshow(image1)
plt.show()
if result[0] == 1:
print("You are angry")
if result[0] == 2:
print("You are disgusted")
if result[0] == 3:
print("you are fear")
if result[0] == 4:
print("you are happy")
if result[0] == 5:
print("You are netural")
if result[0] == 6:
print("You are sad")
if result[0] == 7:
print("You are surprised")
/usr/local/lib/python3.7/dist-packages/tensorflow/python/keras/engine/sequential.py:450: UserWarning: `model.predict_classes()` is deprecated and will be removed after 2021-01-01. Please use instead:* `np.argmax(model.predict(x), axis=-1)`, if your model does multi-class classification (e.g. if it uses a `softmax` last-layer activation).* `(model.predict(x) > 0.5).astype("int32")`, if your model does binary classification (e.g. if it uses a `sigmoid` last-layer activation).
warnings.warn('`model.predict_classes()` is deprecated and '
you are happy
image1 = Image.open("/content/drive/MyDrive/images/unclassifiedImages/Disgust/Disgust5.jpg")
plt.imshow(image1)
plt.show()
rgbImage = image1.resize((224,224),Image.ANTIALIAS).convert('RGB')
plt.imshow(rgbImage)
plt.show()
Xt = []
Xt.append(np.array(rgbImage))
# Convert to NP array
Xt = np.array(Xt)
# Reshape 2D
Xt = Xt.reshape(Xt.shape[0], 224, 224, 3).astype('float32')
# Normalize the data
Xt = Xt /255
result = model3.predict_classes(Xt)
#result = np.argmax(modelC.predict(Xt))
plt.imshow(image1)
plt.show()
if result[0] == 1:
print("You are angry")
if result[0] == 2:
print("You are disgusted")
if result[0] == 3:
print("you are fear")
if result[0] == 4:
print("you are happy")
if result[0] == 5:
print("You are netural")
if result[0] == 6:
print("You are sad")
if result[0] == 7:
print("You are surprised")
/usr/local/lib/python3.7/dist-packages/tensorflow/python/keras/engine/sequential.py:450: UserWarning: `model.predict_classes()` is deprecated and will be removed after 2021-01-01. Please use instead:* `np.argmax(model.predict(x), axis=-1)`, if your model does multi-class classification (e.g. if it uses a `softmax` last-layer activation).* `(model.predict(x) > 0.5).astype("int32")`, if your model does binary classification (e.g. if it uses a `sigmoid` last-layer activation).
warnings.warn('`model.predict_classes()` is deprecated and '
You are sad
image1 = Image.open("/content/drive/MyDrive/images/unclassifiedImages/Disgust/Disgust6.jpg")
plt.imshow(image1)
plt.show()
rgbImage = image1.resize((224,224),Image.ANTIALIAS).convert('RGB')
plt.imshow(rgbImage)
plt.show()
Xt = []
Xt.append(np.array(rgbImage))
# Convert to NP array
Xt = np.array(Xt)
# Reshape 2D
Xt = Xt.reshape(Xt.shape[0], 224, 224, 3).astype('float32')
# Normalize the data
Xt = Xt /255
result = model3.predict_classes(Xt)
#result = np.argmax(modelC.predict(Xt))
plt.imshow(image1)
plt.show()
if result[0] == 1:
print("You are angry")
if result[0] == 2:
print("You are disgusted")
if result[0] == 3:
print("you are fear")
if result[0] == 4:
print("you are happy")
if result[0] == 5:
print("You are netural")
if result[0] == 6:
print("You are sad")
if result[0] == 7:
print("You are surprised")
/usr/local/lib/python3.7/dist-packages/tensorflow/python/keras/engine/sequential.py:450: UserWarning: `model.predict_classes()` is deprecated and will be removed after 2021-01-01. Please use instead:* `np.argmax(model.predict(x), axis=-1)`, if your model does multi-class classification (e.g. if it uses a `softmax` last-layer activation).* `(model.predict(x) > 0.5).astype("int32")`, if your model does binary classification (e.g. if it uses a `sigmoid` last-layer activation).
warnings.warn('`model.predict_classes()` is deprecated and '
you are fear
image1 = Image.open("/content/drive/MyDrive/images/unclassifiedImages/Disgust/Disgust7.jpg")
plt.imshow(image1)
plt.show()
rgbImage = image1.resize((224,224),Image.ANTIALIAS).convert('RGB')
plt.imshow(rgbImage)
plt.show()
Xt = []
Xt.append(np.array(rgbImage))
# Convert to NP array
Xt = np.array(Xt)
# Reshape 2D
Xt = Xt.reshape(Xt.shape[0], 224, 224, 3).astype('float32')
# Normalize the data
Xt = Xt /255
result = model3.predict_classes(Xt)
#result = np.argmax(modelC.predict(Xt))
plt.imshow(image1)
plt.show()
if result[0] == 1:
print("You are angry")
if result[0] == 2:
print("You are disgusted")
if result[0] == 3:
print("you are fear")
if result[0] == 4:
print("you are happy")
if result[0] == 5:
print("You are netural")
if result[0] == 6:
print("You are sad")
if result[0] == 7:
print("You are surprised")
/usr/local/lib/python3.7/dist-packages/tensorflow/python/keras/engine/sequential.py:450: UserWarning: `model.predict_classes()` is deprecated and will be removed after 2021-01-01. Please use instead:* `np.argmax(model.predict(x), axis=-1)`, if your model does multi-class classification (e.g. if it uses a `softmax` last-layer activation).* `(model.predict(x) > 0.5).astype("int32")`, if your model does binary classification (e.g. if it uses a `sigmoid` last-layer activation).
warnings.warn('`model.predict_classes()` is deprecated and '
you are happy
image1 = Image.open("/content/drive/MyDrive/images/unclassifiedImages/Disgust/Disgust8.jpg")
plt.imshow(image1)
plt.show()
rgbImage = image1.resize((224,224),Image.ANTIALIAS).convert('RGB')
plt.imshow(rgbImage)
plt.show()
Xt = []
Xt.append(np.array(rgbImage))
# Convert to NP array
Xt = np.array(Xt)
# Reshape 2D
Xt = Xt.reshape(Xt.shape[0], 224, 224, 3).astype('float32')
# Normalize the data
Xt = Xt /255
result = model3.predict_classes(Xt)
#result = np.argmax(modelC.predict(Xt))
plt.imshow(image1)
plt.show()
if result[0] == 1:
print("You are angry")
if result[0] == 2:
print("You are disgusted")
if result[0] == 3:
print("you are fear")
if result[0] == 4:
print("you are happy")
if result[0] == 5:
print("You are netural")
if result[0] == 6:
print("You are sad")
if result[0] == 7:
print("You are surprised")
/usr/local/lib/python3.7/dist-packages/tensorflow/python/keras/engine/sequential.py:450: UserWarning: `model.predict_classes()` is deprecated and will be removed after 2021-01-01. Please use instead:* `np.argmax(model.predict(x), axis=-1)`, if your model does multi-class classification (e.g. if it uses a `softmax` last-layer activation).* `(model.predict(x) > 0.5).astype("int32")`, if your model does binary classification (e.g. if it uses a `sigmoid` last-layer activation).
warnings.warn('`model.predict_classes()` is deprecated and '
you are fear
image1 = Image.open("/content/drive/MyDrive/images/unclassifiedImages/Disgust/Disgust9.jpg")
plt.imshow(image1)
plt.show()
rgbImage = image1.resize((224,224),Image.ANTIALIAS).convert('RGB')
plt.imshow(rgbImage)
plt.show()
Xt = []
Xt.append(np.array(rgbImage))
# Convert to NP array
Xt = np.array(Xt)
# Reshape 2D
Xt = Xt.reshape(Xt.shape[0], 224, 224, 3).astype('float32')
# Normalize the data
Xt = Xt /255
result = model3.predict_classes(Xt)
#result = np.argmax(modelC.predict(Xt))
plt.imshow(image1)
plt.show()
if result[0] == 1:
print("You are angry")
if result[0] == 2:
print("You are disgusted")
if result[0] == 3:
print("you are fear")
if result[0] == 4:
print("you are happy")
if result[0] == 5:
print("You are netural")
if result[0] == 6:
print("You are sad")
if result[0] == 7:
print("You are surprised")
/usr/local/lib/python3.7/dist-packages/tensorflow/python/keras/engine/sequential.py:450: UserWarning: `model.predict_classes()` is deprecated and will be removed after 2021-01-01. Please use instead:* `np.argmax(model.predict(x), axis=-1)`, if your model does multi-class classification (e.g. if it uses a `softmax` last-layer activation).* `(model.predict(x) > 0.5).astype("int32")`, if your model does binary classification (e.g. if it uses a `sigmoid` last-layer activation).
warnings.warn('`model.predict_classes()` is deprecated and '
you are happy
image1 = Image.open("/content/drive/MyDrive/images/unclassifiedImages/Disgust/Disgust10.jpg")
plt.imshow(image1)
plt.show()
rgbImage = image1.resize((224,224),Image.ANTIALIAS).convert('RGB')
plt.imshow(rgbImage)
plt.show()
Xt = []
Xt.append(np.array(rgbImage))
# Convert to NP array
Xt = np.array(Xt)
# Reshape 2D
Xt = Xt.reshape(Xt.shape[0], 224, 224, 3).astype('float32')
# Normalize the data
Xt = Xt /255
result = model3.predict_classes(Xt)
#result = np.argmax(modelC.predict(Xt))
plt.imshow(image1)
plt.show()
if result[0] == 1:
print("You are angry")
if result[0] == 2:
print("You are disgusted")
if result[0] == 3:
print("you are fear")
if result[0] == 4:
print("you are happy")
if result[0] == 5:
print("You are netural")
if result[0] == 6:
print("You are sad")
if result[0] == 7:
print("You are surprised")
/usr/local/lib/python3.7/dist-packages/tensorflow/python/keras/engine/sequential.py:450: UserWarning: `model.predict_classes()` is deprecated and will be removed after 2021-01-01. Please use instead:* `np.argmax(model.predict(x), axis=-1)`, if your model does multi-class classification (e.g. if it uses a `softmax` last-layer activation).* `(model.predict(x) > 0.5).astype("int32")`, if your model does binary classification (e.g. if it uses a `sigmoid` last-layer activation).
warnings.warn('`model.predict_classes()` is deprecated and '
you are happy
image1 = Image.open("/content/drive/MyDrive/images/unclassifiedImages/Disgust/Disgust11.jpg")
plt.imshow(image1)
plt.show()
rgbImage = image1.resize((224,224),Image.ANTIALIAS).convert('RGB')
plt.imshow(rgbImage)
plt.show()
Xt = []
Xt.append(np.array(rgbImage))
# Convert to NP array
Xt = np.array(Xt)
# Reshape 2D
Xt = Xt.reshape(Xt.shape[0], 224, 224, 3).astype('float32')
# Normalize the data
Xt = Xt /255
result = model3.predict_classes(Xt)
#result = np.argmax(modelC.predict(Xt))
plt.imshow(image1)
plt.show()
if result[0] == 1:
print("You are angry")
if result[0] == 2:
print("You are disgusted")
if result[0] == 3:
print("you are fear")
if result[0] == 4:
print("you are happy")
if result[0] == 5:
print("You are netural")
if result[0] == 6:
print("You are sad")
if result[0] == 7:
print("You are surprised")
/usr/local/lib/python3.7/dist-packages/tensorflow/python/keras/engine/sequential.py:450: UserWarning: `model.predict_classes()` is deprecated and will be removed after 2021-01-01. Please use instead:* `np.argmax(model.predict(x), axis=-1)`, if your model does multi-class classification (e.g. if it uses a `softmax` last-layer activation).* `(model.predict(x) > 0.5).astype("int32")`, if your model does binary classification (e.g. if it uses a `sigmoid` last-layer activation).
warnings.warn('`model.predict_classes()` is deprecated and '
you are happy
image1 = Image.open("/content/drive/MyDrive/images/unclassifiedImages/Disgust/Disgust12.jpg")
plt.imshow(image1)
plt.show()
rgbImage = image1.resize((224,224),Image.ANTIALIAS).convert('RGB')
plt.imshow(rgbImage)
plt.show()
Xt = []
Xt.append(np.array(rgbImage))
# Convert to NP array
Xt = np.array(Xt)
# Reshape 2D
Xt = Xt.reshape(Xt.shape[0], 224, 224, 3).astype('float32')
# Normalize the data
Xt = Xt /255
result = model3.predict_classes(Xt)
#result = np.argmax(modelC.predict(Xt))
plt.imshow(image1)
plt.show()
if result[0] == 1:
print("You are angry")
if result[0] == 2:
print("You are disgusted")
if result[0] == 3:
print("you are fear")
if result[0] == 4:
print("you are happy")
if result[0] == 5:
print("You are netural")
if result[0] == 6:
print("You are sad")
if result[0] == 7:
print("You are surprised")
/usr/local/lib/python3.7/dist-packages/tensorflow/python/keras/engine/sequential.py:450: UserWarning: `model.predict_classes()` is deprecated and will be removed after 2021-01-01. Please use instead:* `np.argmax(model.predict(x), axis=-1)`, if your model does multi-class classification (e.g. if it uses a `softmax` last-layer activation).* `(model.predict(x) > 0.5).astype("int32")`, if your model does binary classification (e.g. if it uses a `sigmoid` last-layer activation).
warnings.warn('`model.predict_classes()` is deprecated and '
you are happy
image1 = Image.open("/content/drive/MyDrive/images/unclassifiedImages/Disgust/Disgust13.jpg")
plt.imshow(image1)
plt.show()
rgbImage = image1.resize((224,224),Image.ANTIALIAS).convert('RGB')
plt.imshow(rgbImage)
plt.show()
Xt = []
Xt.append(np.array(rgbImage))
# Convert to NP array
Xt = np.array(Xt)
# Reshape 2D
Xt = Xt.reshape(Xt.shape[0], 224, 224, 3).astype('float32')
# Normalize the data
Xt = Xt /255
result = model3.predict_classes(Xt)
#result = np.argmax(modelC.predict(Xt))
plt.imshow(image1)
plt.show()
if result[0] == 1:
print("You are angry")
if result[0] == 2:
print("You are disgusted")
if result[0] == 3:
print("you are fear")
if result[0] == 4:
print("you are happy")
if result[0] == 5:
print("You are netural")
if result[0] == 6:
print("You are sad")
if result[0] == 7:
print("You are surprised")
/usr/local/lib/python3.7/dist-packages/tensorflow/python/keras/engine/sequential.py:450: UserWarning: `model.predict_classes()` is deprecated and will be removed after 2021-01-01. Please use instead:* `np.argmax(model.predict(x), axis=-1)`, if your model does multi-class classification (e.g. if it uses a `softmax` last-layer activation).* `(model.predict(x) > 0.5).astype("int32")`, if your model does binary classification (e.g. if it uses a `sigmoid` last-layer activation).
warnings.warn('`model.predict_classes()` is deprecated and '
you are happy
image1 = Image.open("/content/drive/MyDrive/images/unclassifiedImages/Disgust/Disgust14.jpg")
plt.imshow(image1)
plt.show()
rgbImage = image1.resize((224,224),Image.ANTIALIAS).convert('RGB')
plt.imshow(rgbImage)
plt.show()
Xt = []
Xt.append(np.array(rgbImage))
# Convert to NP array
Xt = np.array(Xt)
# Reshape 2D
Xt = Xt.reshape(Xt.shape[0], 224, 224, 3).astype('float32')
# Normalize the data
Xt = Xt /255
result = model3.predict_classes(Xt)
#result = np.argmax(modelC.predict(Xt))
plt.imshow(image1)
plt.show()
if result[0] == 1:
print("You are angry")
if result[0] == 2:
print("You are disgusted")
if result[0] == 3:
print("you are fear")
if result[0] == 4:
print("you are happy")
if result[0] == 5:
print("You are netural")
if result[0] == 6:
print("You are sad")
if result[0] == 7:
print("You are surprised")
/usr/local/lib/python3.7/dist-packages/tensorflow/python/keras/engine/sequential.py:450: UserWarning: `model.predict_classes()` is deprecated and will be removed after 2021-01-01. Please use instead:* `np.argmax(model.predict(x), axis=-1)`, if your model does multi-class classification (e.g. if it uses a `softmax` last-layer activation).* `(model.predict(x) > 0.5).astype("int32")`, if your model does binary classification (e.g. if it uses a `sigmoid` last-layer activation).
warnings.warn('`model.predict_classes()` is deprecated and '
You are sad
image1 = Image.open("/content/drive/MyDrive/images/unclassifiedImages/Disgust/Disgust15.jpg")
plt.imshow(image1)
plt.show()
rgbImage = image1.resize((224,224),Image.ANTIALIAS).convert('RGB')
plt.imshow(rgbImage)
plt.show()
Xt = []
Xt.append(np.array(rgbImage))
# Convert to NP array
Xt = np.array(Xt)
# Reshape 2D
Xt = Xt.reshape(Xt.shape[0], 224, 224, 3).astype('float32')
# Normalize the data
Xt = Xt /255
result = model3.predict_classes(Xt)
#result = np.argmax(modelC.predict(Xt))
plt.imshow(image1)
plt.show()
if result[0] == 1:
print("You are angry")
if result[0] == 2:
print("You are disgusted")
if result[0] == 3:
print("you are fear")
if result[0] == 4:
print("you are happy")
if result[0] == 5:
print("You are netural")
if result[0] == 6:
print("You are sad")
if result[0] == 7:
print("You are surprised")
/usr/local/lib/python3.7/dist-packages/tensorflow/python/keras/engine/sequential.py:450: UserWarning: `model.predict_classes()` is deprecated and will be removed after 2021-01-01. Please use instead:* `np.argmax(model.predict(x), axis=-1)`, if your model does multi-class classification (e.g. if it uses a `softmax` last-layer activation).* `(model.predict(x) > 0.5).astype("int32")`, if your model does binary classification (e.g. if it uses a `sigmoid` last-layer activation).
warnings.warn('`model.predict_classes()` is deprecated and '
you are fear
image1 = Image.open("/content/drive/MyDrive/images/unclassifiedImages/Disgust/Disgust16.jpg")
plt.imshow(image1)
plt.show()
rgbImage = image1.resize((224,224),Image.ANTIALIAS).convert('RGB')
plt.imshow(rgbImage)
plt.show()
Xt = []
Xt.append(np.array(rgbImage))
# Convert to NP array
Xt = np.array(Xt)
# Reshape 2D
Xt = Xt.reshape(Xt.shape[0], 224, 224, 3).astype('float32')
# Normalize the data
Xt = Xt /255
result = model3.predict_classes(Xt)
#result = np.argmax(modelC.predict(Xt))
plt.imshow(image1)
plt.show()
if result[0] == 1:
print("You are angry")
if result[0] == 2:
print("You are disgusted")
if result[0] == 3:
print("you are fear")
if result[0] == 4:
print("you are happy")
if result[0] == 5:
print("You are netural")
if result[0] == 6:
print("You are sad")
if result[0] == 7:
print("You are surprised")
/usr/local/lib/python3.7/dist-packages/tensorflow/python/keras/engine/sequential.py:450: UserWarning: `model.predict_classes()` is deprecated and will be removed after 2021-01-01. Please use instead:* `np.argmax(model.predict(x), axis=-1)`, if your model does multi-class classification (e.g. if it uses a `softmax` last-layer activation).* `(model.predict(x) > 0.5).astype("int32")`, if your model does binary classification (e.g. if it uses a `sigmoid` last-layer activation).
warnings.warn('`model.predict_classes()` is deprecated and '
you are happy
image1 = Image.open("/content/drive/MyDrive/images/unclassifiedImages/Disgust/Disgust17.jpg")
plt.imshow(image1)
plt.show()
rgbImage = image1.resize((224,224),Image.ANTIALIAS).convert('RGB')
plt.imshow(rgbImage)
plt.show()
Xt = []
Xt.append(np.array(rgbImage))
# Convert to NP array
Xt = np.array(Xt)
# Reshape 2D
Xt = Xt.reshape(Xt.shape[0], 224, 224, 3).astype('float32')
# Normalize the data
Xt = Xt /255
result = model3.predict_classes(Xt)
#result = np.argmax(modelC.predict(Xt))
plt.imshow(image1)
plt.show()
if result[0] == 1:
print("You are angry")
if result[0] == 2:
print("You are disgusted")
if result[0] == 3:
print("you are fear")
if result[0] == 4:
print("you are happy")
if result[0] == 5:
print("You are netural")
if result[0] == 6:
print("You are sad")
if result[0] == 7:
print("You are surprised")
/usr/local/lib/python3.7/dist-packages/tensorflow/python/keras/engine/sequential.py:450: UserWarning: `model.predict_classes()` is deprecated and will be removed after 2021-01-01. Please use instead:* `np.argmax(model.predict(x), axis=-1)`, if your model does multi-class classification (e.g. if it uses a `softmax` last-layer activation).* `(model.predict(x) > 0.5).astype("int32")`, if your model does binary classification (e.g. if it uses a `sigmoid` last-layer activation).
warnings.warn('`model.predict_classes()` is deprecated and '
You are sad
image1 = Image.open("/content/drive/MyDrive/images/unclassifiedImages/Disgust/Disgust18.jpg")
plt.imshow(image1)
plt.show()
rgbImage = image1.resize((224,224),Image.ANTIALIAS).convert('RGB')
plt.imshow(rgbImage)
plt.show()
Xt = []
Xt.append(np.array(rgbImage))
# Convert to NP array
Xt = np.array(Xt)
# Reshape 2D
Xt = Xt.reshape(Xt.shape[0], 224, 224, 3).astype('float32')
# Normalize the data
Xt = Xt /255
result = model3.predict_classes(Xt)
#result = np.argmax(modelC.predict(Xt))
plt.imshow(image1)
plt.show()
if result[0] == 1:
print("You are angry")
if result[0] == 2:
print("You are disgusted")
if result[0] == 3:
print("you are fear")
if result[0] == 4:
print("you are happy")
if result[0] == 5:
print("You are netural")
if result[0] == 6:
print("You are sad")
if result[0] == 7:
print("You are surprised")
/usr/local/lib/python3.7/dist-packages/tensorflow/python/keras/engine/sequential.py:450: UserWarning: `model.predict_classes()` is deprecated and will be removed after 2021-01-01. Please use instead:* `np.argmax(model.predict(x), axis=-1)`, if your model does multi-class classification (e.g. if it uses a `softmax` last-layer activation).* `(model.predict(x) > 0.5).astype("int32")`, if your model does binary classification (e.g. if it uses a `sigmoid` last-layer activation).
warnings.warn('`model.predict_classes()` is deprecated and '
you are happy
image1 = Image.open("/content/drive/MyDrive/images/unclassifiedImages/Disgust/Disgust19.jpg")
plt.imshow(image1)
plt.show()
rgbImage = image1.resize((224,224),Image.ANTIALIAS).convert('RGB')
plt.imshow(rgbImage)
plt.show()
Xt = []
Xt.append(np.array(rgbImage))
# Convert to NP array
Xt = np.array(Xt)
# Reshape 2D
Xt = Xt.reshape(Xt.shape[0], 224, 224, 3).astype('float32')
# Normalize the data
Xt = Xt /255
result = model3.predict_classes(Xt)
#result = np.argmax(modelC.predict(Xt))
plt.imshow(image1)
plt.show()
if result[0] == 1:
print("You are angry")
if result[0] == 2:
print("You are disgusted")
if result[0] == 3:
print("you are fear")
if result[0] == 4:
print("you are happy")
if result[0] == 5:
print("You are netural")
if result[0] == 6:
print("You are sad")
if result[0] == 7:
print("You are surprised")
/usr/local/lib/python3.7/dist-packages/tensorflow/python/keras/engine/sequential.py:450: UserWarning: `model.predict_classes()` is deprecated and will be removed after 2021-01-01. Please use instead:* `np.argmax(model.predict(x), axis=-1)`, if your model does multi-class classification (e.g. if it uses a `softmax` last-layer activation).* `(model.predict(x) > 0.5).astype("int32")`, if your model does binary classification (e.g. if it uses a `sigmoid` last-layer activation).
warnings.warn('`model.predict_classes()` is deprecated and '
you are fear
image1 = Image.open("/content/drive/MyDrive/images/unclassifiedImages/Disgust/Disgust20.jpg")
plt.imshow(image1)
plt.show()
rgbImage = image1.resize((224,224),Image.ANTIALIAS).convert('RGB')
plt.imshow(rgbImage)
plt.show()
Xt = []
Xt.append(np.array(rgbImage))
# Convert to NP array
Xt = np.array(Xt)
# Reshape 2D
Xt = Xt.reshape(Xt.shape[0], 224, 224, 3).astype('float32')
# Normalize the data
Xt = Xt /255
result = model3.predict_classes(Xt)
#result = np.argmax(modelC.predict(Xt))
plt.imshow(image1)
plt.show()
if result[0] == 1:
print("You are angry")
if result[0] == 2:
print("You are disgusted")
if result[0] == 3:
print("you are fear")
if result[0] == 4:
print("you are happy")
if result[0] == 5:
print("You are netural")
if result[0] == 6:
print("You are sad")
if result[0] == 7:
print("You are surprised")
/usr/local/lib/python3.7/dist-packages/tensorflow/python/keras/engine/sequential.py:450: UserWarning: `model.predict_classes()` is deprecated and will be removed after 2021-01-01. Please use instead:* `np.argmax(model.predict(x), axis=-1)`, if your model does multi-class classification (e.g. if it uses a `softmax` last-layer activation).* `(model.predict(x) > 0.5).astype("int32")`, if your model does binary classification (e.g. if it uses a `sigmoid` last-layer activation).
warnings.warn('`model.predict_classes()` is deprecated and '
You are sad
Fear
image1 = Image.open("/content/drive/MyDrive/images/unclassifiedImages/Fear/Fear1.jpg")
plt.imshow(image1)
plt.show()
rgbImage = image1.resize((224,224),Image.ANTIALIAS).convert('RGB')
plt.imshow(rgbImage)
plt.show()
Xt = []
Xt.append(np.array(rgbImage))
# Convert to NP array
Xt = np.array(Xt)
# Reshape 2D
Xt = Xt.reshape(Xt.shape[0], 224, 224, 3).astype('float32')
# Normalize the data
Xt = Xt /255
result = model3.predict_classes(Xt)
#result = np.argmax(modelC.predict(Xt))
plt.imshow(image1)
plt.show()
if result[0] == 1:
print("You are angry")
if result[0] == 2:
print("You are disgusted")
if result[0] == 3:
print("you are fear")
if result[0] == 4:
print("you are happy")
if result[0] == 5:
print("You are netural")
if result[0] == 6:
print("You are sad")
if result[0] == 7:
print("You are surprised")
/usr/local/lib/python3.7/dist-packages/tensorflow/python/keras/engine/sequential.py:450: UserWarning: `model.predict_classes()` is deprecated and will be removed after 2021-01-01. Please use instead:* `np.argmax(model.predict(x), axis=-1)`, if your model does multi-class classification (e.g. if it uses a `softmax` last-layer activation).* `(model.predict(x) > 0.5).astype("int32")`, if your model does binary classification (e.g. if it uses a `sigmoid` last-layer activation).
warnings.warn('`model.predict_classes()` is deprecated and '
You are sad
image1 = Image.open("/content/drive/MyDrive/images/unclassifiedImages/Fear/Fear2.jpg")
plt.imshow(image1)
plt.show()
rgbImage = image1.resize((224,224),Image.ANTIALIAS).convert('RGB')
plt.imshow(rgbImage)
plt.show()
Xt = []
Xt.append(np.array(rgbImage))
# Convert to NP array
Xt = np.array(Xt)
# Reshape 2D
Xt = Xt.reshape(Xt.shape[0], 224, 224, 3).astype('float32')
# Normalize the data
Xt = Xt /255
result = model3.predict_classes(Xt)
#result = np.argmax(modelC.predict(Xt))
plt.imshow(image1)
plt.show()
if result[0] == 1:
print("You are angry")
if result[0] == 2:
print("You are disgusted")
if result[0] == 3:
print("you are fear")
if result[0] == 4:
print("you are happy")
if result[0] == 5:
print("You are netural")
if result[0] == 6:
print("You are sad")
if result[0] == 7:
print("You are surprised")
/usr/local/lib/python3.7/dist-packages/tensorflow/python/keras/engine/sequential.py:450: UserWarning: `model.predict_classes()` is deprecated and will be removed after 2021-01-01. Please use instead:* `np.argmax(model.predict(x), axis=-1)`, if your model does multi-class classification (e.g. if it uses a `softmax` last-layer activation).* `(model.predict(x) > 0.5).astype("int32")`, if your model does binary classification (e.g. if it uses a `sigmoid` last-layer activation).
warnings.warn('`model.predict_classes()` is deprecated and '
You are surprised
image1 = Image.open("/content/drive/MyDrive/images/unclassifiedImages/Fear/Fear3.jpg")
plt.imshow(image1)
plt.show()
rgbImage = image1.resize((224,224),Image.ANTIALIAS).convert('RGB')
plt.imshow(rgbImage)
plt.show()
Xt = []
Xt.append(np.array(rgbImage))
# Convert to NP array
Xt = np.array(Xt)
# Reshape 2D
Xt = Xt.reshape(Xt.shape[0], 224, 224, 3).astype('float32')
# Normalize the data
Xt = Xt /255
result = model3.predict_classes(Xt)
#result = np.argmax(modelC.predict(Xt))
plt.imshow(image1)
plt.show()
if result[0] == 1:
print("You are angry")
if result[0] == 2:
print("You are disgusted")
if result[0] == 3:
print("you are fear")
if result[0] == 4:
print("you are happy")
if result[0] == 5:
print("You are netural")
if result[0] == 6:
print("You are sad")
if result[0] == 7:
print("You are surprised")
/usr/local/lib/python3.7/dist-packages/tensorflow/python/keras/engine/sequential.py:450: UserWarning: `model.predict_classes()` is deprecated and will be removed after 2021-01-01. Please use instead:* `np.argmax(model.predict(x), axis=-1)`, if your model does multi-class classification (e.g. if it uses a `softmax` last-layer activation).* `(model.predict(x) > 0.5).astype("int32")`, if your model does binary classification (e.g. if it uses a `sigmoid` last-layer activation).
warnings.warn('`model.predict_classes()` is deprecated and '
You are surprised
image1 = Image.open("/content/drive/MyDrive/images/unclassifiedImages/Fear/Fear4.jpg")
plt.imshow(image1)
plt.show()
rgbImage = image1.resize((224,224),Image.ANTIALIAS).convert('RGB')
plt.imshow(rgbImage)
plt.show()
Xt = []
Xt.append(np.array(rgbImage))
# Convert to NP array
Xt = np.array(Xt)
# Reshape 2D
Xt = Xt.reshape(Xt.shape[0], 224, 224, 3).astype('float32')
# Normalize the data
Xt = Xt /255
result = model3.predict_classes(Xt)
#result = np.argmax(modelC.predict(Xt))
plt.imshow(image1)
plt.show()
if result[0] == 1:
print("You are angry")
if result[0] == 2:
print("You are disgusted")
if result[0] == 3:
print("you are fear")
if result[0] == 4:
print("you are happy")
if result[0] == 5:
print("You are netural")
if result[0] == 6:
print("You are sad")
if result[0] == 7:
print("You are surprised")
/usr/local/lib/python3.7/dist-packages/tensorflow/python/keras/engine/sequential.py:450: UserWarning: `model.predict_classes()` is deprecated and will be removed after 2021-01-01. Please use instead:* `np.argmax(model.predict(x), axis=-1)`, if your model does multi-class classification (e.g. if it uses a `softmax` last-layer activation).* `(model.predict(x) > 0.5).astype("int32")`, if your model does binary classification (e.g. if it uses a `sigmoid` last-layer activation).
warnings.warn('`model.predict_classes()` is deprecated and '
you are happy
image1 = Image.open("/content/drive/MyDrive/images/unclassifiedImages/Fear/Fear5.jpg")
plt.imshow(image1)
plt.show()
rgbImage = image1.resize((224,224),Image.ANTIALIAS).convert('RGB')
plt.imshow(rgbImage)
plt.show()
Xt = []
Xt.append(np.array(rgbImage))
# Convert to NP array
Xt = np.array(Xt)
# Reshape 2D
Xt = Xt.reshape(Xt.shape[0], 224, 224, 3).astype('float32')
# Normalize the data
Xt = Xt /255
result = model3.predict_classes(Xt)
#result = np.argmax(modelC.predict(Xt))
plt.imshow(image1)
plt.show()
if result[0] == 1:
print("You are angry")
if result[0] == 2:
print("You are disgusted")
if result[0] == 3:
print("you are fear")
if result[0] == 4:
print("you are happy")
if result[0] == 5:
print("You are netural")
if result[0] == 6:
print("You are sad")
if result[0] == 7:
print("You are surprised")
/usr/local/lib/python3.7/dist-packages/tensorflow/python/keras/engine/sequential.py:450: UserWarning: `model.predict_classes()` is deprecated and will be removed after 2021-01-01. Please use instead:* `np.argmax(model.predict(x), axis=-1)`, if your model does multi-class classification (e.g. if it uses a `softmax` last-layer activation).* `(model.predict(x) > 0.5).astype("int32")`, if your model does binary classification (e.g. if it uses a `sigmoid` last-layer activation).
warnings.warn('`model.predict_classes()` is deprecated and '
You are angry
image1 = Image.open("/content/drive/MyDrive/images/unclassifiedImages/Fear/Fear6.jpg")
plt.imshow(image1)
plt.show()
rgbImage = image1.resize((224,224),Image.ANTIALIAS).convert('RGB')
plt.imshow(rgbImage)
plt.show()
Xt = []
Xt.append(np.array(rgbImage))
# Convert to NP array
Xt = np.array(Xt)
# Reshape 2D
Xt = Xt.reshape(Xt.shape[0], 224, 224, 3).astype('float32')
# Normalize the data
Xt = Xt /255
result = model3.predict_classes(Xt)
#result = np.argmax(modelC.predict(Xt))
plt.imshow(image1)
plt.show()
if result[0] == 1:
print("You are angry")
if result[0] == 2:
print("You are disgusted")
if result[0] == 3:
print("you are fear")
if result[0] == 4:
print("you are happy")
if result[0] == 5:
print("You are netural")
if result[0] == 6:
print("You are sad")
if result[0] == 7:
print("You are surprised")
/usr/local/lib/python3.7/dist-packages/tensorflow/python/keras/engine/sequential.py:450: UserWarning: `model.predict_classes()` is deprecated and will be removed after 2021-01-01. Please use instead:* `np.argmax(model.predict(x), axis=-1)`, if your model does multi-class classification (e.g. if it uses a `softmax` last-layer activation).* `(model.predict(x) > 0.5).astype("int32")`, if your model does binary classification (e.g. if it uses a `sigmoid` last-layer activation).
warnings.warn('`model.predict_classes()` is deprecated and '
you are fear
image1 = Image.open("/content/drive/MyDrive/images/unclassifiedImages/Fear/Fear7.jpg")
plt.imshow(image1)
plt.show()
rgbImage = image1.resize((224,224),Image.ANTIALIAS).convert('RGB')
plt.imshow(rgbImage)
plt.show()
Xt = []
Xt.append(np.array(rgbImage))
# Convert to NP array
Xt = np.array(Xt)
# Reshape 2D
Xt = Xt.reshape(Xt.shape[0], 224, 224, 3).astype('float32')
# Normalize the data
Xt = Xt /255
result = model3.predict_classes(Xt)
#result = np.argmax(modelC.predict(Xt))
plt.imshow(image1)
plt.show()
if result[0] == 1:
print("You are angry")
if result[0] == 2:
print("You are disgusted")
if result[0] == 3:
print("you are fear")
if result[0] == 4:
print("you are happy")
if result[0] == 5:
print("You are netural")
if result[0] == 6:
print("You are sad")
if result[0] == 7:
print("You are surprised")
/usr/local/lib/python3.7/dist-packages/tensorflow/python/keras/engine/sequential.py:450: UserWarning: `model.predict_classes()` is deprecated and will be removed after 2021-01-01. Please use instead:* `np.argmax(model.predict(x), axis=-1)`, if your model does multi-class classification (e.g. if it uses a `softmax` last-layer activation).* `(model.predict(x) > 0.5).astype("int32")`, if your model does binary classification (e.g. if it uses a `sigmoid` last-layer activation).
warnings.warn('`model.predict_classes()` is deprecated and '
You are surprised
image1 = Image.open("/content/drive/MyDrive/images/unclassifiedImages/Fear/Fear8.jpg")
plt.imshow(image1)
plt.show()
rgbImage = image1.resize((224,224),Image.ANTIALIAS).convert('RGB')
plt.imshow(rgbImage)
plt.show()
Xt = []
Xt.append(np.array(rgbImage))
# Convert to NP array
Xt = np.array(Xt)
# Reshape 2D
Xt = Xt.reshape(Xt.shape[0], 224, 224, 3).astype('float32')
# Normalize the data
Xt = Xt /255
result = model3.predict_classes(Xt)
#result = np.argmax(modelC.predict(Xt))
plt.imshow(image1)
plt.show()
if result[0] == 1:
print("You are angry")
if result[0] == 2:
print("You are disgusted")
if result[0] == 3:
print("you are fear")
if result[0] == 4:
print("you are happy")
if result[0] == 5:
print("You are netural")
if result[0] == 6:
print("You are sad")
if result[0] == 7:
print("You are surprised")
/usr/local/lib/python3.7/dist-packages/tensorflow/python/keras/engine/sequential.py:450: UserWarning: `model.predict_classes()` is deprecated and will be removed after 2021-01-01. Please use instead:* `np.argmax(model.predict(x), axis=-1)`, if your model does multi-class classification (e.g. if it uses a `softmax` last-layer activation).* `(model.predict(x) > 0.5).astype("int32")`, if your model does binary classification (e.g. if it uses a `sigmoid` last-layer activation).
warnings.warn('`model.predict_classes()` is deprecated and '
You are surprised
image1 = Image.open("/content/drive/MyDrive/images/unclassifiedImages/Fear/Fear9.jpg")
plt.imshow(image1)
plt.show()
rgbImage = image1.resize((224,224),Image.ANTIALIAS).convert('RGB')
plt.imshow(rgbImage)
plt.show()
Xt = []
Xt.append(np.array(rgbImage))
# Convert to NP array
Xt = np.array(Xt)
# Reshape 2D
Xt = Xt.reshape(Xt.shape[0], 224, 224, 3).astype('float32')
# Normalize the data
Xt = Xt /255
result = model3.predict_classes(Xt)
#result = np.argmax(modelC.predict(Xt))
plt.imshow(image1)
plt.show()
if result[0] == 1:
print("You are angry")
if result[0] == 2:
print("You are disgusted")
if result[0] == 3:
print("you are fear")
if result[0] == 4:
print("you are happy")
if result[0] == 5:
print("You are netural")
if result[0] == 6:
print("You are sad")
if result[0] == 7:
print("You are surprised")
/usr/local/lib/python3.7/dist-packages/tensorflow/python/keras/engine/sequential.py:450: UserWarning: `model.predict_classes()` is deprecated and will be removed after 2021-01-01. Please use instead:* `np.argmax(model.predict(x), axis=-1)`, if your model does multi-class classification (e.g. if it uses a `softmax` last-layer activation).* `(model.predict(x) > 0.5).astype("int32")`, if your model does binary classification (e.g. if it uses a `sigmoid` last-layer activation).
warnings.warn('`model.predict_classes()` is deprecated and '
You are surprised
image1 = Image.open("/content/drive/MyDrive/images/unclassifiedImages/Fear/Fear10.jpg")
plt.imshow(image1)
plt.show()
rgbImage = image1.resize((224,224),Image.ANTIALIAS).convert('RGB')
plt.imshow(rgbImage)
plt.show()
Xt = []
Xt.append(np.array(rgbImage))
# Convert to NP array
Xt = np.array(Xt)
# Reshape 2D
Xt = Xt.reshape(Xt.shape[0], 224, 224, 3).astype('float32')
# Normalize the data
Xt = Xt /255
result = model3.predict_classes(Xt)
#result = np.argmax(modelC.predict(Xt))
plt.imshow(image1)
plt.show()
if result[0] == 1:
print("You are angry")
if result[0] == 2:
print("You are disgusted")
if result[0] == 3:
print("you are fear")
if result[0] == 4:
print("you are happy")
if result[0] == 5:
print("You are netural")
if result[0] == 6:
print("You are sad")
if result[0] == 7:
print("You are surprised")
/usr/local/lib/python3.7/dist-packages/tensorflow/python/keras/engine/sequential.py:450: UserWarning: `model.predict_classes()` is deprecated and will be removed after 2021-01-01. Please use instead:* `np.argmax(model.predict(x), axis=-1)`, if your model does multi-class classification (e.g. if it uses a `softmax` last-layer activation).* `(model.predict(x) > 0.5).astype("int32")`, if your model does binary classification (e.g. if it uses a `sigmoid` last-layer activation).
warnings.warn('`model.predict_classes()` is deprecated and '
you are happy
image1 = Image.open("/content/drive/MyDrive/images/unclassifiedImages/Fear/Fear11.jpg")
plt.imshow(image1)
plt.show()
rgbImage = image1.resize((224,224),Image.ANTIALIAS).convert('RGB')
plt.imshow(rgbImage)
plt.show()
Xt = []
Xt.append(np.array(rgbImage))
# Convert to NP array
Xt = np.array(Xt)
# Reshape 2D
Xt = Xt.reshape(Xt.shape[0], 224, 224, 3).astype('float32')
# Normalize the data
Xt = Xt /255
result = model3.predict_classes(Xt)
#result = np.argmax(modelC.predict(Xt))
plt.imshow(image1)
plt.show()
if result[0] == 1:
print("You are angry")
if result[0] == 2:
print("You are disgusted")
if result[0] == 3:
print("you are fear")
if result[0] == 4:
print("you are happy")
if result[0] == 5:
print("You are netural")
if result[0] == 6:
print("You are sad")
if result[0] == 7:
print("You are surprised")
/usr/local/lib/python3.7/dist-packages/tensorflow/python/keras/engine/sequential.py:450: UserWarning: `model.predict_classes()` is deprecated and will be removed after 2021-01-01. Please use instead:* `np.argmax(model.predict(x), axis=-1)`, if your model does multi-class classification (e.g. if it uses a `softmax` last-layer activation).* `(model.predict(x) > 0.5).astype("int32")`, if your model does binary classification (e.g. if it uses a `sigmoid` last-layer activation).
warnings.warn('`model.predict_classes()` is deprecated and '
you are happy
image1 = Image.open("/content/drive/MyDrive/images/unclassifiedImages/Fear/Fear12.jpg")
plt.imshow(image1)
plt.show()
rgbImage = image1.resize((224,224),Image.ANTIALIAS).convert('RGB')
plt.imshow(rgbImage)
plt.show()
Xt = []
Xt.append(np.array(rgbImage))
# Convert to NP array
Xt = np.array(Xt)
# Reshape 2D
Xt = Xt.reshape(Xt.shape[0], 224, 224, 3).astype('float32')
# Normalize the data
Xt = Xt /255
result = model3.predict_classes(Xt)
#result = np.argmax(modelC.predict(Xt))
plt.imshow(image1)
plt.show()
if result[0] == 1:
print("You are angry")
if result[0] == 2:
print("You are disgusted")
if result[0] == 3:
print("you are fear")
if result[0] == 4:
print("you are happy")
if result[0] == 5:
print("You are netural")
if result[0] == 6:
print("You are sad")
if result[0] == 7:
print("You are surprised")
/usr/local/lib/python3.7/dist-packages/tensorflow/python/keras/engine/sequential.py:450: UserWarning: `model.predict_classes()` is deprecated and will be removed after 2021-01-01. Please use instead:* `np.argmax(model.predict(x), axis=-1)`, if your model does multi-class classification (e.g. if it uses a `softmax` last-layer activation).* `(model.predict(x) > 0.5).astype("int32")`, if your model does binary classification (e.g. if it uses a `sigmoid` last-layer activation).
warnings.warn('`model.predict_classes()` is deprecated and '
You are surprised
image1 = Image.open("/content/drive/MyDrive/images/unclassifiedImages/Fear/Fear13.jpg")
plt.imshow(image1)
plt.show()
rgbImage = image1.resize((224,224),Image.ANTIALIAS).convert('RGB')
plt.imshow(rgbImage)
plt.show()
Xt = []
Xt.append(np.array(rgbImage))
# Convert to NP array
Xt = np.array(Xt)
# Reshape 2D
Xt = Xt.reshape(Xt.shape[0], 224, 224, 3).astype('float32')
# Normalize the data
Xt = Xt /255
result = model3.predict_classes(Xt)
#result = np.argmax(modelC.predict(Xt))
plt.imshow(image1)
plt.show()
if result[0] == 1:
print("You are angry")
if result[0] == 2:
print("You are disgusted")
if result[0] == 3:
print("you are fear")
if result[0] == 4:
print("you are happy")
if result[0] == 5:
print("You are netural")
if result[0] == 6:
print("You are sad")
if result[0] == 7:
print("You are surprised")
/usr/local/lib/python3.7/dist-packages/tensorflow/python/keras/engine/sequential.py:450: UserWarning: `model.predict_classes()` is deprecated and will be removed after 2021-01-01. Please use instead:* `np.argmax(model.predict(x), axis=-1)`, if your model does multi-class classification (e.g. if it uses a `softmax` last-layer activation).* `(model.predict(x) > 0.5).astype("int32")`, if your model does binary classification (e.g. if it uses a `sigmoid` last-layer activation).
warnings.warn('`model.predict_classes()` is deprecated and '
you are happy
image1 = Image.open("/content/drive/MyDrive/images/unclassifiedImages/Fear/Fear14.jpg")
plt.imshow(image1)
plt.show()
rgbImage = image1.resize((224,224),Image.ANTIALIAS).convert('RGB')
plt.imshow(rgbImage)
plt.show()
Xt = []
Xt.append(np.array(rgbImage))
# Convert to NP array
Xt = np.array(Xt)
# Reshape 2D
Xt = Xt.reshape(Xt.shape[0], 224, 224, 3).astype('float32')
# Normalize the data
Xt = Xt /255
result = model3.predict_classes(Xt)
#result = np.argmax(modelC.predict(Xt))
plt.imshow(image1)
plt.show()
if result[0] == 1:
print("You are angry")
if result[0] == 2:
print("You are disgusted")
if result[0] == 3:
print("you are fear")
if result[0] == 4:
print("you are happy")
if result[0] == 5:
print("You are netural")
if result[0] == 6:
print("You are sad")
if result[0] == 7:
print("You are surprised")
/usr/local/lib/python3.7/dist-packages/tensorflow/python/keras/engine/sequential.py:450: UserWarning: `model.predict_classes()` is deprecated and will be removed after 2021-01-01. Please use instead:* `np.argmax(model.predict(x), axis=-1)`, if your model does multi-class classification (e.g. if it uses a `softmax` last-layer activation).* `(model.predict(x) > 0.5).astype("int32")`, if your model does binary classification (e.g. if it uses a `sigmoid` last-layer activation).
warnings.warn('`model.predict_classes()` is deprecated and '
You are surprised
image1 = Image.open("/content/drive/MyDrive/images/unclassifiedImages/Fear/Fear15.jpg")
plt.imshow(image1)
plt.show()
rgbImage = image1.resize((224,224),Image.ANTIALIAS).convert('RGB')
plt.imshow(rgbImage)
plt.show()
Xt = []
Xt.append(np.array(rgbImage))
# Convert to NP array
Xt = np.array(Xt)
# Reshape 2D
Xt = Xt.reshape(Xt.shape[0], 224, 224, 3).astype('float32')
# Normalize the data
Xt = Xt /255
result = model3.predict_classes(Xt)
#result = np.argmax(modelC.predict(Xt))
plt.imshow(image1)
plt.show()
if result[0] == 1:
print("You are angry")
if result[0] == 2:
print("You are disgusted")
if result[0] == 3:
print("you are fear")
if result[0] == 4:
print("you are happy")
if result[0] == 5:
print("You are netural")
if result[0] == 6:
print("You are sad")
if result[0] == 7:
print("You are surprised")
/usr/local/lib/python3.7/dist-packages/tensorflow/python/keras/engine/sequential.py:450: UserWarning: `model.predict_classes()` is deprecated and will be removed after 2021-01-01. Please use instead:* `np.argmax(model.predict(x), axis=-1)`, if your model does multi-class classification (e.g. if it uses a `softmax` last-layer activation).* `(model.predict(x) > 0.5).astype("int32")`, if your model does binary classification (e.g. if it uses a `sigmoid` last-layer activation).
warnings.warn('`model.predict_classes()` is deprecated and '
You are surprised
image1 = Image.open("/content/drive/MyDrive/images/unclassifiedImages/Fear/Fear16.jpg")
plt.imshow(image1)
plt.show()
rgbImage = image1.resize((224,224),Image.ANTIALIAS).convert('RGB')
plt.imshow(rgbImage)
plt.show()
Xt = []
Xt.append(np.array(rgbImage))
# Convert to NP array
Xt = np.array(Xt)
# Reshape 2D
Xt = Xt.reshape(Xt.shape[0], 224, 224, 3).astype('float32')
# Normalize the data
Xt = Xt /255
result = model3.predict_classes(Xt)
#result = np.argmax(modelC.predict(Xt))
plt.imshow(image1)
plt.show()
if result[0] == 1:
print("You are angry")
if result[0] == 2:
print("You are disgusted")
if result[0] == 3:
print("you are fear")
if result[0] == 4:
print("you are happy")
if result[0] == 5:
print("You are netural")
if result[0] == 6:
print("You are sad")
if result[0] == 7:
print("You are surprised")
/usr/local/lib/python3.7/dist-packages/tensorflow/python/keras/engine/sequential.py:450: UserWarning: `model.predict_classes()` is deprecated and will be removed after 2021-01-01. Please use instead:* `np.argmax(model.predict(x), axis=-1)`, if your model does multi-class classification (e.g. if it uses a `softmax` last-layer activation).* `(model.predict(x) > 0.5).astype("int32")`, if your model does binary classification (e.g. if it uses a `sigmoid` last-layer activation).
warnings.warn('`model.predict_classes()` is deprecated and '
You are angry
image1 = Image.open("/content/drive/MyDrive/images/unclassifiedImages/Fear/Fear17.jpg")
plt.imshow(image1)
plt.show()
rgbImage = image1.resize((224,224),Image.ANTIALIAS).convert('RGB')
plt.imshow(rgbImage)
plt.show()
Xt = []
Xt.append(np.array(rgbImage))
# Convert to NP array
Xt = np.array(Xt)
# Reshape 2D
Xt = Xt.reshape(Xt.shape[0], 224, 224, 3).astype('float32')
# Normalize the data
Xt = Xt /255
result = model3.predict_classes(Xt)
#result = np.argmax(modelC.predict(Xt))
plt.imshow(image1)
plt.show()
if result[0] == 1:
print("You are angry")
if result[0] == 2:
print("You are disgusted")
if result[0] == 3:
print("you are fear")
if result[0] == 4:
print("you are happy")
if result[0] == 5:
print("You are netural")
if result[0] == 6:
print("You are sad")
if result[0] == 7:
print("You are surprised")
/usr/local/lib/python3.7/dist-packages/tensorflow/python/keras/engine/sequential.py:450: UserWarning: `model.predict_classes()` is deprecated and will be removed after 2021-01-01. Please use instead:* `np.argmax(model.predict(x), axis=-1)`, if your model does multi-class classification (e.g. if it uses a `softmax` last-layer activation).* `(model.predict(x) > 0.5).astype("int32")`, if your model does binary classification (e.g. if it uses a `sigmoid` last-layer activation).
warnings.warn('`model.predict_classes()` is deprecated and '
you are happy
image1 = Image.open("/content/drive/MyDrive/images/unclassifiedImages/Fear/Fear18.jpg")
plt.imshow(image1)
plt.show()
rgbImage = image1.resize((224,224),Image.ANTIALIAS).convert('RGB')
plt.imshow(rgbImage)
plt.show()
Xt = []
Xt.append(np.array(rgbImage))
# Convert to NP array
Xt = np.array(Xt)
# Reshape 2D
Xt = Xt.reshape(Xt.shape[0], 224, 224, 3).astype('float32')
# Normalize the data
Xt = Xt /255
result = model3.predict_classes(Xt)
#result = np.argmax(modelC.predict(Xt))
plt.imshow(image1)
plt.show()
if result[0] == 1:
print("You are angry")
if result[0] == 2:
print("You are disgusted")
if result[0] == 3:
print("you are fear")
if result[0] == 4:
print("you are happy")
if result[0] == 5:
print("You are netural")
if result[0] == 6:
print("You are sad")
if result[0] == 7:
print("You are surprised")
/usr/local/lib/python3.7/dist-packages/tensorflow/python/keras/engine/sequential.py:450: UserWarning: `model.predict_classes()` is deprecated and will be removed after 2021-01-01. Please use instead:* `np.argmax(model.predict(x), axis=-1)`, if your model does multi-class classification (e.g. if it uses a `softmax` last-layer activation).* `(model.predict(x) > 0.5).astype("int32")`, if your model does binary classification (e.g. if it uses a `sigmoid` last-layer activation).
warnings.warn('`model.predict_classes()` is deprecated and '
You are surprised
image1 = Image.open("/content/drive/MyDrive/images/unclassifiedImages/Fear/Fear19.jpg")
plt.imshow(image1)
plt.show()
rgbImage = image1.resize((224,224),Image.ANTIALIAS).convert('RGB')
plt.imshow(rgbImage)
plt.show()
Xt = []
Xt.append(np.array(rgbImage))
# Convert to NP array
Xt = np.array(Xt)
# Reshape 2D
Xt = Xt.reshape(Xt.shape[0], 224, 224, 3).astype('float32')
# Normalize the data
Xt = Xt /255
result = model3.predict_classes(Xt)
#result = np.argmax(modelC.predict(Xt))
plt.imshow(image1)
plt.show()
if result[0] == 1:
print("You are angry")
if result[0] == 2:
print("You are disgusted")
if result[0] == 3:
print("you are fear")
if result[0] == 4:
print("you are happy")
if result[0] == 5:
print("You are netural")
if result[0] == 6:
print("You are sad")
if result[0] == 7:
print("You are surprised")
/usr/local/lib/python3.7/dist-packages/tensorflow/python/keras/engine/sequential.py:450: UserWarning: `model.predict_classes()` is deprecated and will be removed after 2021-01-01. Please use instead:* `np.argmax(model.predict(x), axis=-1)`, if your model does multi-class classification (e.g. if it uses a `softmax` last-layer activation).* `(model.predict(x) > 0.5).astype("int32")`, if your model does binary classification (e.g. if it uses a `sigmoid` last-layer activation).
warnings.warn('`model.predict_classes()` is deprecated and '
you are happy
image1 = Image.open("/content/drive/MyDrive/images/unclassifiedImages/Fear/Fear20.jpg")
plt.imshow(image1)
plt.show()
rgbImage = image1.resize((224,224),Image.ANTIALIAS).convert('RGB')
plt.imshow(rgbImage)
plt.show()
Xt = []
Xt.append(np.array(rgbImage))
# Convert to NP array
Xt = np.array(Xt)
# Reshape 2D
Xt = Xt.reshape(Xt.shape[0], 224, 224, 3).astype('float32')
# Normalize the data
Xt = Xt /255
result = model3.predict_classes(Xt)
#result = np.argmax(modelC.predict(Xt))
plt.imshow(image1)
plt.show()
if result[0] == 1:
print("You are angry")
if result[0] == 2:
print("You are disgusted")
if result[0] == 3:
print("you are fear")
if result[0] == 4:
print("you are happy")
if result[0] == 5:
print("You are netural")
if result[0] == 6:
print("You are sad")
if result[0] == 7:
print("You are surprised")
/usr/local/lib/python3.7/dist-packages/tensorflow/python/keras/engine/sequential.py:450: UserWarning: `model.predict_classes()` is deprecated and will be removed after 2021-01-01. Please use instead:* `np.argmax(model.predict(x), axis=-1)`, if your model does multi-class classification (e.g. if it uses a `softmax` last-layer activation).* `(model.predict(x) > 0.5).astype("int32")`, if your model does binary classification (e.g. if it uses a `sigmoid` last-layer activation).
warnings.warn('`model.predict_classes()` is deprecated and '
you are happy
Happy
image1 = Image.open("/content/drive/MyDrive/images/unclassifiedImages/Happy/Happy1.jpg")
plt.imshow(image1)
plt.show()
rgbImage = image1.resize((224,224),Image.ANTIALIAS).convert('RGB')
plt.imshow(rgbImage)
plt.show()
Xt = []
Xt.append(np.array(rgbImage))
# Convert to NP array
Xt = np.array(Xt)
# Reshape 2D
Xt = Xt.reshape(Xt.shape[0], 224, 224, 3).astype('float32')
# Normalize the data
Xt = Xt /255
result = model3.predict_classes(Xt)
#result = np.argmax(modelC.predict(Xt))
plt.imshow(image1)
plt.show()
if result[0] == 1:
print("You are angry")
if result[0] == 2:
print("You are disgusted")
if result[0] == 3:
print("you are fear")
if result[0] == 4:
print("you are happy")
if result[0] == 5:
print("You are netural")
if result[0] == 6:
print("You are sad")
if result[0] == 7:
print("You are surprised")
/usr/local/lib/python3.7/dist-packages/tensorflow/python/keras/engine/sequential.py:450: UserWarning: `model.predict_classes()` is deprecated and will be removed after 2021-01-01. Please use instead:* `np.argmax(model.predict(x), axis=-1)`, if your model does multi-class classification (e.g. if it uses a `softmax` last-layer activation).* `(model.predict(x) > 0.5).astype("int32")`, if your model does binary classification (e.g. if it uses a `sigmoid` last-layer activation).
warnings.warn('`model.predict_classes()` is deprecated and '
you are happy
image1 = Image.open("/content/drive/MyDrive/images/unclassifiedImages/Happy/Happy2.jpg")
plt.imshow(image1)
plt.show()
rgbImage = image1.resize((224,224),Image.ANTIALIAS).convert('RGB')
plt.imshow(rgbImage)
plt.show()
Xt = []
Xt.append(np.array(rgbImage))
# Convert to NP array
Xt = np.array(Xt)
# Reshape 2D
Xt = Xt.reshape(Xt.shape[0], 224, 224, 3).astype('float32')
# Normalize the data
Xt = Xt /255
result = model3.predict_classes(Xt)
#result = np.argmax(modelC.predict(Xt))
plt.imshow(image1)
plt.show()
if result[0] == 1:
print("You are angry")
if result[0] == 2:
print("You are disgusted")
if result[0] == 3:
print("you are fear")
if result[0] == 4:
print("you are happy")
if result[0] == 5:
print("You are netural")
if result[0] == 6:
print("You are sad")
if result[0] == 7:
print("You are surprised")
/usr/local/lib/python3.7/dist-packages/tensorflow/python/keras/engine/sequential.py:450: UserWarning: `model.predict_classes()` is deprecated and will be removed after 2021-01-01. Please use instead:* `np.argmax(model.predict(x), axis=-1)`, if your model does multi-class classification (e.g. if it uses a `softmax` last-layer activation).* `(model.predict(x) > 0.5).astype("int32")`, if your model does binary classification (e.g. if it uses a `sigmoid` last-layer activation).
warnings.warn('`model.predict_classes()` is deprecated and '
you are happy
image1 = Image.open("/content/drive/MyDrive/images/unclassifiedImages/Happy/Happy3.jpg")
plt.imshow(image1)
plt.show()
rgbImage = image1.resize((224,224),Image.ANTIALIAS).convert('RGB')
plt.imshow(rgbImage)
plt.show()
Xt = []
Xt.append(np.array(rgbImage))
# Convert to NP array
Xt = np.array(Xt)
# Reshape 2D
Xt = Xt.reshape(Xt.shape[0], 224, 224, 3).astype('float32')
# Normalize the data
Xt = Xt /255
result = model3.predict_classes(Xt)
#result = np.argmax(modelC.predict(Xt))
plt.imshow(image1)
plt.show()
if result[0] == 1:
print("You are angry")
if result[0] == 2:
print("You are disgusted")
if result[0] == 3:
print("you are fear")
if result[0] == 4:
print("you are happy")
if result[0] == 5:
print("You are netural")
if result[0] == 6:
print("You are sad")
if result[0] == 7:
print("You are surprised")
/usr/local/lib/python3.7/dist-packages/tensorflow/python/keras/engine/sequential.py:450: UserWarning: `model.predict_classes()` is deprecated and will be removed after 2021-01-01. Please use instead:* `np.argmax(model.predict(x), axis=-1)`, if your model does multi-class classification (e.g. if it uses a `softmax` last-layer activation).* `(model.predict(x) > 0.5).astype("int32")`, if your model does binary classification (e.g. if it uses a `sigmoid` last-layer activation).
warnings.warn('`model.predict_classes()` is deprecated and '
you are happy
image1 = Image.open("/content/drive/MyDrive/images/unclassifiedImages/Happy/Happy4.jpg")
plt.imshow(image1)
plt.show()
rgbImage = image1.resize((224,224),Image.ANTIALIAS).convert('RGB')
plt.imshow(rgbImage)
plt.show()
Xt = []
Xt.append(np.array(rgbImage))
# Convert to NP array
Xt = np.array(Xt)
# Reshape 2D
Xt = Xt.reshape(Xt.shape[0], 224, 224, 3).astype('float32')
# Normalize the data
Xt = Xt /255
result = model3.predict_classes(Xt)
#result = np.argmax(modelC.predict(Xt))
plt.imshow(image1)
plt.show()
if result[0] == 1:
print("You are angry")
if result[0] == 2:
print("You are disgusted")
if result[0] == 3:
print("you are fear")
if result[0] == 4:
print("you are happy")
if result[0] == 5:
print("You are netural")
if result[0] == 6:
print("You are sad")
if result[0] == 7:
print("You are surprised")
/usr/local/lib/python3.7/dist-packages/tensorflow/python/keras/engine/sequential.py:450: UserWarning: `model.predict_classes()` is deprecated and will be removed after 2021-01-01. Please use instead:* `np.argmax(model.predict(x), axis=-1)`, if your model does multi-class classification (e.g. if it uses a `softmax` last-layer activation).* `(model.predict(x) > 0.5).astype("int32")`, if your model does binary classification (e.g. if it uses a `sigmoid` last-layer activation).
warnings.warn('`model.predict_classes()` is deprecated and '
you are happy
image1 = Image.open("/content/drive/MyDrive/images/unclassifiedImages/Happy/Happy5.jpg")
plt.imshow(image1)
plt.show()
rgbImage = image1.resize((224,224),Image.ANTIALIAS).convert('RGB')
plt.imshow(rgbImage)
plt.show()
Xt = []
Xt.append(np.array(rgbImage))
# Convert to NP array
Xt = np.array(Xt)
# Reshape 2D
Xt = Xt.reshape(Xt.shape[0], 224, 224, 3).astype('float32')
# Normalize the data
Xt = Xt /255
result = model3.predict_classes(Xt)
#result = np.argmax(modelC.predict(Xt))
plt.imshow(image1)
plt.show()
if result[0] == 1:
print("You are angry")
if result[0] == 2:
print("You are disgusted")
if result[0] == 3:
print("you are fear")
if result[0] == 4:
print("you are happy")
if result[0] == 5:
print("You are netural")
if result[0] == 6:
print("You are sad")
if result[0] == 7:
print("You are surprised")
/usr/local/lib/python3.7/dist-packages/tensorflow/python/keras/engine/sequential.py:450: UserWarning: `model.predict_classes()` is deprecated and will be removed after 2021-01-01. Please use instead:* `np.argmax(model.predict(x), axis=-1)`, if your model does multi-class classification (e.g. if it uses a `softmax` last-layer activation).* `(model.predict(x) > 0.5).astype("int32")`, if your model does binary classification (e.g. if it uses a `sigmoid` last-layer activation).
warnings.warn('`model.predict_classes()` is deprecated and '
you are happy
image1 = Image.open("/content/drive/MyDrive/images/unclassifiedImages/Happy/Happy6.jpg")
plt.imshow(image1)
plt.show()
rgbImage = image1.resize((224,224),Image.ANTIALIAS).convert('RGB')
plt.imshow(rgbImage)
plt.show()
Xt = []
Xt.append(np.array(rgbImage))
# Convert to NP array
Xt = np.array(Xt)
# Reshape 2D
Xt = Xt.reshape(Xt.shape[0], 224, 224, 3).astype('float32')
# Normalize the data
Xt = Xt /255
result = model3.predict_classes(Xt)
#result = np.argmax(modelC.predict(Xt))
plt.imshow(image1)
plt.show()
if result[0] == 1:
print("You are angry")
if result[0] == 2:
print("You are disgusted")
if result[0] == 3:
print("you are fear")
if result[0] == 4:
print("you are happy")
if result[0] == 5:
print("You are netural")
if result[0] == 6:
print("You are sad")
if result[0] == 7:
print("You are surprised")
/usr/local/lib/python3.7/dist-packages/tensorflow/python/keras/engine/sequential.py:450: UserWarning: `model.predict_classes()` is deprecated and will be removed after 2021-01-01. Please use instead:* `np.argmax(model.predict(x), axis=-1)`, if your model does multi-class classification (e.g. if it uses a `softmax` last-layer activation).* `(model.predict(x) > 0.5).astype("int32")`, if your model does binary classification (e.g. if it uses a `sigmoid` last-layer activation).
warnings.warn('`model.predict_classes()` is deprecated and '
you are happy
image1 = Image.open("/content/drive/MyDrive/images/unclassifiedImages/Happy/Happy7.jpg")
plt.imshow(image1)
plt.show()
rgbImage = image1.resize((224,224),Image.ANTIALIAS).convert('RGB')
plt.imshow(rgbImage)
plt.show()
Xt = []
Xt.append(np.array(rgbImage))
# Convert to NP array
Xt = np.array(Xt)
# Reshape 2D
Xt = Xt.reshape(Xt.shape[0], 224, 224, 3).astype('float32')
# Normalize the data
Xt = Xt /255
result = model3.predict_classes(Xt)
#result = np.argmax(modelC.predict(Xt))
plt.imshow(image1)
plt.show()
if result[0] == 1:
print("You are angry")
if result[0] == 2:
print("You are disgusted")
if result[0] == 3:
print("you are fear")
if result[0] == 4:
print("you are happy")
if result[0] == 5:
print("You are netural")
if result[0] == 6:
print("You are sad")
if result[0] == 7:
print("You are surprised")
/usr/local/lib/python3.7/dist-packages/tensorflow/python/keras/engine/sequential.py:450: UserWarning: `model.predict_classes()` is deprecated and will be removed after 2021-01-01. Please use instead:* `np.argmax(model.predict(x), axis=-1)`, if your model does multi-class classification (e.g. if it uses a `softmax` last-layer activation).* `(model.predict(x) > 0.5).astype("int32")`, if your model does binary classification (e.g. if it uses a `sigmoid` last-layer activation).
warnings.warn('`model.predict_classes()` is deprecated and '
you are happy
image1 = Image.open("/content/drive/MyDrive/images/unclassifiedImages/Happy/Happy8.jpg")
plt.imshow(image1)
plt.show()
rgbImage = image1.resize((224,224),Image.ANTIALIAS).convert('RGB')
plt.imshow(rgbImage)
plt.show()
Xt = []
Xt.append(np.array(rgbImage))
# Convert to NP array
Xt = np.array(Xt)
# Reshape 2D
Xt = Xt.reshape(Xt.shape[0], 224, 224, 3).astype('float32')
# Normalize the data
Xt = Xt /255
result = model3.predict_classes(Xt)
#result = np.argmax(modelC.predict(Xt))
plt.imshow(image1)
plt.show()
if result[0] == 1:
print("You are angry")
if result[0] == 2:
print("You are disgusted")
if result[0] == 3:
print("you are fear")
if result[0] == 4:
print("you are happy")
if result[0] == 5:
print("You are netural")
if result[0] == 6:
print("You are sad")
if result[0] == 7:
print("You are surprised")
/usr/local/lib/python3.7/dist-packages/tensorflow/python/keras/engine/sequential.py:450: UserWarning: `model.predict_classes()` is deprecated and will be removed after 2021-01-01. Please use instead:* `np.argmax(model.predict(x), axis=-1)`, if your model does multi-class classification (e.g. if it uses a `softmax` last-layer activation).* `(model.predict(x) > 0.5).astype("int32")`, if your model does binary classification (e.g. if it uses a `sigmoid` last-layer activation).
warnings.warn('`model.predict_classes()` is deprecated and '
you are happy
image1 = Image.open("/content/drive/MyDrive/images/unclassifiedImages/Happy/Happy9.jpg")
plt.imshow(image1)
plt.show()
rgbImage = image1.resize((224,224),Image.ANTIALIAS).convert('RGB')
plt.imshow(rgbImage)
plt.show()
Xt = []
Xt.append(np.array(rgbImage))
# Convert to NP array
Xt = np.array(Xt)
# Reshape 2D
Xt = Xt.reshape(Xt.shape[0], 224, 224, 3).astype('float32')
# Normalize the data
Xt = Xt /255
result = model3.predict_classes(Xt)
#result = np.argmax(modelC.predict(Xt))
plt.imshow(image1)
plt.show()
if result[0] == 1:
print("You are angry")
if result[0] == 2:
print("You are disgusted")
if result[0] == 3:
print("you are fear")
if result[0] == 4:
print("you are happy")
if result[0] == 5:
print("You are netural")
if result[0] == 6:
print("You are sad")
if result[0] == 7:
print("You are surprised")
/usr/local/lib/python3.7/dist-packages/tensorflow/python/keras/engine/sequential.py:450: UserWarning: `model.predict_classes()` is deprecated and will be removed after 2021-01-01. Please use instead:* `np.argmax(model.predict(x), axis=-1)`, if your model does multi-class classification (e.g. if it uses a `softmax` last-layer activation).* `(model.predict(x) > 0.5).astype("int32")`, if your model does binary classification (e.g. if it uses a `sigmoid` last-layer activation).
warnings.warn('`model.predict_classes()` is deprecated and '
you are happy
image1 = Image.open("/content/drive/MyDrive/images/unclassifiedImages/Happy/Happy10.jpg")
plt.imshow(image1)
plt.show()
rgbImage = image1.resize((224,224),Image.ANTIALIAS).convert('RGB')
plt.imshow(rgbImage)
plt.show()
Xt = []
Xt.append(np.array(rgbImage))
# Convert to NP array
Xt = np.array(Xt)
# Reshape 2D
Xt = Xt.reshape(Xt.shape[0], 224, 224, 3).astype('float32')
# Normalize the data
Xt = Xt /255
result = model3.predict_classes(Xt)
#result = np.argmax(modelC.predict(Xt))
plt.imshow(image1)
plt.show()
if result[0] == 1:
print("You are angry")
if result[0] == 2:
print("You are disgusted")
if result[0] == 3:
print("you are fear")
if result[0] == 4:
print("you are happy")
if result[0] == 5:
print("You are netural")
if result[0] == 6:
print("You are sad")
if result[0] == 7:
print("You are surprised")
/usr/local/lib/python3.7/dist-packages/tensorflow/python/keras/engine/sequential.py:450: UserWarning: `model.predict_classes()` is deprecated and will be removed after 2021-01-01. Please use instead:* `np.argmax(model.predict(x), axis=-1)`, if your model does multi-class classification (e.g. if it uses a `softmax` last-layer activation).* `(model.predict(x) > 0.5).astype("int32")`, if your model does binary classification (e.g. if it uses a `sigmoid` last-layer activation).
warnings.warn('`model.predict_classes()` is deprecated and '
you are happy
image1 = Image.open("/content/drive/MyDrive/images/unclassifiedImages/Happy/Happy11.jpg")
plt.imshow(image1)
plt.show()
rgbImage = image1.resize((224,224),Image.ANTIALIAS).convert('RGB')
plt.imshow(rgbImage)
plt.show()
Xt = []
Xt.append(np.array(rgbImage))
# Convert to NP array
Xt = np.array(Xt)
# Reshape 2D
Xt = Xt.reshape(Xt.shape[0], 224, 224, 3).astype('float32')
# Normalize the data
Xt = Xt /255
result = model3.predict_classes(Xt)
#result = np.argmax(modelC.predict(Xt))
plt.imshow(image1)
plt.show()
if result[0] == 1:
print("You are angry")
if result[0] == 2:
print("You are disgusted")
if result[0] == 3:
print("you are fear")
if result[0] == 4:
print("you are happy")
if result[0] == 5:
print("You are netural")
if result[0] == 6:
print("You are sad")
if result[0] == 7:
print("You are surprised")
/usr/local/lib/python3.7/dist-packages/tensorflow/python/keras/engine/sequential.py:450: UserWarning: `model.predict_classes()` is deprecated and will be removed after 2021-01-01. Please use instead:* `np.argmax(model.predict(x), axis=-1)`, if your model does multi-class classification (e.g. if it uses a `softmax` last-layer activation).* `(model.predict(x) > 0.5).astype("int32")`, if your model does binary classification (e.g. if it uses a `sigmoid` last-layer activation).
warnings.warn('`model.predict_classes()` is deprecated and '
you are happy
image1 = Image.open("/content/drive/MyDrive/images/unclassifiedImages/Happy/Happy12.jpg")
plt.imshow(image1)
plt.show()
rgbImage = image1.resize((224,224),Image.ANTIALIAS).convert('RGB')
plt.imshow(rgbImage)
plt.show()
Xt = []
Xt.append(np.array(rgbImage))
# Convert to NP array
Xt = np.array(Xt)
# Reshape 2D
Xt = Xt.reshape(Xt.shape[0], 224, 224, 3).astype('float32')
# Normalize the data
Xt = Xt /255
result = model3.predict_classes(Xt)
#result = np.argmax(modelC.predict(Xt))
plt.imshow(image1)
plt.show()
if result[0] == 1:
print("You are angry")
if result[0] == 2:
print("You are disgusted")
if result[0] == 3:
print("you are fear")
if result[0] == 4:
print("you are happy")
if result[0] == 5:
print("You are netural")
if result[0] == 6:
print("You are sad")
if result[0] == 7:
print("You are surprised")
/usr/local/lib/python3.7/dist-packages/tensorflow/python/keras/engine/sequential.py:450: UserWarning: `model.predict_classes()` is deprecated and will be removed after 2021-01-01. Please use instead:* `np.argmax(model.predict(x), axis=-1)`, if your model does multi-class classification (e.g. if it uses a `softmax` last-layer activation).* `(model.predict(x) > 0.5).astype("int32")`, if your model does binary classification (e.g. if it uses a `sigmoid` last-layer activation).
warnings.warn('`model.predict_classes()` is deprecated and '
you are happy
image1 = Image.open("/content/drive/MyDrive/images/unclassifiedImages/Happy/Happy13.jpg")
plt.imshow(image1)
plt.show()
rgbImage = image1.resize((224,224),Image.ANTIALIAS).convert('RGB')
plt.imshow(rgbImage)
plt.show()
Xt = []
Xt.append(np.array(rgbImage))
# Convert to NP array
Xt = np.array(Xt)
# Reshape 2D
Xt = Xt.reshape(Xt.shape[0], 224, 224, 3).astype('float32')
# Normalize the data
Xt = Xt /255
result = model3.predict_classes(Xt)
#result = np.argmax(modelC.predict(Xt))
plt.imshow(image1)
plt.show()
if result[0] == 1:
print("You are angry")
if result[0] == 2:
print("You are disgusted")
if result[0] == 3:
print("you are fear")
if result[0] == 4:
print("you are happy")
if result[0] == 5:
print("You are netural")
if result[0] == 6:
print("You are sad")
if result[0] == 7:
print("You are surprised")
/usr/local/lib/python3.7/dist-packages/tensorflow/python/keras/engine/sequential.py:450: UserWarning: `model.predict_classes()` is deprecated and will be removed after 2021-01-01. Please use instead:* `np.argmax(model.predict(x), axis=-1)`, if your model does multi-class classification (e.g. if it uses a `softmax` last-layer activation).* `(model.predict(x) > 0.5).astype("int32")`, if your model does binary classification (e.g. if it uses a `sigmoid` last-layer activation).
warnings.warn('`model.predict_classes()` is deprecated and '
you are happy
image1 = Image.open("/content/drive/MyDrive/images/unclassifiedImages/Happy/Happy14.jpg")
plt.imshow(image1)
plt.show()
rgbImage = image1.resize((224,224),Image.ANTIALIAS).convert('RGB')
plt.imshow(rgbImage)
plt.show()
Xt = []
Xt.append(np.array(rgbImage))
# Convert to NP array
Xt = np.array(Xt)
# Reshape 2D
Xt = Xt.reshape(Xt.shape[0], 224, 224, 3).astype('float32')
# Normalize the data
Xt = Xt /255
result = model3.predict_classes(Xt)
#result = np.argmax(modelC.predict(Xt))
plt.imshow(image1)
plt.show()
if result[0] == 1:
print("You are angry")
if result[0] == 2:
print("You are disgusted")
if result[0] == 3:
print("you are fear")
if result[0] == 4:
print("you are happy")
if result[0] == 5:
print("You are netural")
if result[0] == 6:
print("You are sad")
if result[0] == 7:
print("You are surprised")
/usr/local/lib/python3.7/dist-packages/tensorflow/python/keras/engine/sequential.py:450: UserWarning: `model.predict_classes()` is deprecated and will be removed after 2021-01-01. Please use instead:* `np.argmax(model.predict(x), axis=-1)`, if your model does multi-class classification (e.g. if it uses a `softmax` last-layer activation).* `(model.predict(x) > 0.5).astype("int32")`, if your model does binary classification (e.g. if it uses a `sigmoid` last-layer activation).
warnings.warn('`model.predict_classes()` is deprecated and '
You are surprised
image1 = Image.open("/content/drive/MyDrive/images/unclassifiedImages/Happy/Happy15.jpg")
plt.imshow(image1)
plt.show()
rgbImage = image1.resize((224,224),Image.ANTIALIAS).convert('RGB')
plt.imshow(rgbImage)
plt.show()
Xt = []
Xt.append(np.array(rgbImage))
# Convert to NP array
Xt = np.array(Xt)
# Reshape 2D
Xt = Xt.reshape(Xt.shape[0], 224, 224, 3).astype('float32')
# Normalize the data
Xt = Xt /255
result = model3.predict_classes(Xt)
#result = np.argmax(modelC.predict(Xt))
plt.imshow(image1)
plt.show()
if result[0] == 1:
print("You are angry")
if result[0] == 2:
print("You are disgusted")
if result[0] == 3:
print("you are fear")
if result[0] == 4:
print("you are happy")
if result[0] == 5:
print("You are netural")
if result[0] == 6:
print("You are sad")
if result[0] == 7:
print("You are surprised")
/usr/local/lib/python3.7/dist-packages/tensorflow/python/keras/engine/sequential.py:450: UserWarning: `model.predict_classes()` is deprecated and will be removed after 2021-01-01. Please use instead:* `np.argmax(model.predict(x), axis=-1)`, if your model does multi-class classification (e.g. if it uses a `softmax` last-layer activation).* `(model.predict(x) > 0.5).astype("int32")`, if your model does binary classification (e.g. if it uses a `sigmoid` last-layer activation).
warnings.warn('`model.predict_classes()` is deprecated and '
you are happy
image1 = Image.open("/content/drive/MyDrive/images/unclassifiedImages/Happy/Happy16.jpg")
plt.imshow(image1)
plt.show()
rgbImage = image1.resize((224,224),Image.ANTIALIAS).convert('RGB')
plt.imshow(rgbImage)
plt.show()
Xt = []
Xt.append(np.array(rgbImage))
# Convert to NP array
Xt = np.array(Xt)
# Reshape 2D
Xt = Xt.reshape(Xt.shape[0], 224, 224, 3).astype('float32')
# Normalize the data
Xt = Xt /255
result = model3.predict_classes(Xt)
#result = np.argmax(modelC.predict(Xt))
plt.imshow(image1)
plt.show()
if result[0] == 1:
print("You are angry")
if result[0] == 2:
print("You are disgusted")
if result[0] == 3:
print("you are fear")
if result[0] == 4:
print("you are happy")
if result[0] == 5:
print("You are netural")
if result[0] == 6:
print("You are sad")
if result[0] == 7:
print("You are surprised")
/usr/local/lib/python3.7/dist-packages/tensorflow/python/keras/engine/sequential.py:450: UserWarning: `model.predict_classes()` is deprecated and will be removed after 2021-01-01. Please use instead:* `np.argmax(model.predict(x), axis=-1)`, if your model does multi-class classification (e.g. if it uses a `softmax` last-layer activation).* `(model.predict(x) > 0.5).astype("int32")`, if your model does binary classification (e.g. if it uses a `sigmoid` last-layer activation).
warnings.warn('`model.predict_classes()` is deprecated and '
you are happy
image1 = Image.open("/content/drive/MyDrive/images/unclassifiedImages/Happy/Happy17.jpg")
plt.imshow(image1)
plt.show()
rgbImage = image1.resize((224,224),Image.ANTIALIAS).convert('RGB')
plt.imshow(rgbImage)
plt.show()
Xt = []
Xt.append(np.array(rgbImage))
# Convert to NP array
Xt = np.array(Xt)
# Reshape 2D
Xt = Xt.reshape(Xt.shape[0], 224, 224, 3).astype('float32')
# Normalize the data
Xt = Xt /255
result = model3.predict_classes(Xt)
#result = np.argmax(modelC.predict(Xt))
plt.imshow(image1)
plt.show()
if result[0] == 1:
print("You are angry")
if result[0] == 2:
print("You are disgusted")
if result[0] == 3:
print("you are fear")
if result[0] == 4:
print("you are happy")
if result[0] == 5:
print("You are netural")
if result[0] == 6:
print("You are sad")
if result[0] == 7:
print("You are surprised")
/usr/local/lib/python3.7/dist-packages/tensorflow/python/keras/engine/sequential.py:450: UserWarning: `model.predict_classes()` is deprecated and will be removed after 2021-01-01. Please use instead:* `np.argmax(model.predict(x), axis=-1)`, if your model does multi-class classification (e.g. if it uses a `softmax` last-layer activation).* `(model.predict(x) > 0.5).astype("int32")`, if your model does binary classification (e.g. if it uses a `sigmoid` last-layer activation).
warnings.warn('`model.predict_classes()` is deprecated and '
you are fear
image1 = Image.open("/content/drive/MyDrive/images/unclassifiedImages/Happy/Happy18.jpg")
plt.imshow(image1)
plt.show()
rgbImage = image1.resize((224,224),Image.ANTIALIAS).convert('RGB')
plt.imshow(rgbImage)
plt.show()
Xt = []
Xt.append(np.array(rgbImage))
# Convert to NP array
Xt = np.array(Xt)
# Reshape 2D
Xt = Xt.reshape(Xt.shape[0], 224, 224, 3).astype('float32')
# Normalize the data
Xt = Xt /255
result = model3.predict_classes(Xt)
#result = np.argmax(modelC.predict(Xt))
plt.imshow(image1)
plt.show()
if result[0] == 1:
print("You are angry")
if result[0] == 2:
print("You are disgusted")
if result[0] == 3:
print("you are fear")
if result[0] == 4:
print("you are happy")
if result[0] == 5:
print("You are netural")
if result[0] == 6:
print("You are sad")
if result[0] == 7:
print("You are surprised")
/usr/local/lib/python3.7/dist-packages/tensorflow/python/keras/engine/sequential.py:450: UserWarning: `model.predict_classes()` is deprecated and will be removed after 2021-01-01. Please use instead:* `np.argmax(model.predict(x), axis=-1)`, if your model does multi-class classification (e.g. if it uses a `softmax` last-layer activation).* `(model.predict(x) > 0.5).astype("int32")`, if your model does binary classification (e.g. if it uses a `sigmoid` last-layer activation).
warnings.warn('`model.predict_classes()` is deprecated and '
you are happy
image1 = Image.open("/content/drive/MyDrive/images/unclassifiedImages/Happy/Happy19.jpg")
plt.imshow(image1)
plt.show()
rgbImage = image1.resize((224,224),Image.ANTIALIAS).convert('RGB')
plt.imshow(rgbImage)
plt.show()
Xt = []
Xt.append(np.array(rgbImage))
# Convert to NP array
Xt = np.array(Xt)
# Reshape 2D
Xt = Xt.reshape(Xt.shape[0], 224, 224, 3).astype('float32')
# Normalize the data
Xt = Xt /255
result = model3.predict_classes(Xt)
#result = np.argmax(modelC.predict(Xt))
plt.imshow(image1)
plt.show()
if result[0] == 1:
print("You are angry")
if result[0] == 2:
print("You are disgusted")
if result[0] == 3:
print("you are fear")
if result[0] == 4:
print("you are happy")
if result[0] == 5:
print("You are netural")
if result[0] == 6:
print("You are sad")
if result[0] == 7:
print("You are surprised")
/usr/local/lib/python3.7/dist-packages/tensorflow/python/keras/engine/sequential.py:450: UserWarning: `model.predict_classes()` is deprecated and will be removed after 2021-01-01. Please use instead:* `np.argmax(model.predict(x), axis=-1)`, if your model does multi-class classification (e.g. if it uses a `softmax` last-layer activation).* `(model.predict(x) > 0.5).astype("int32")`, if your model does binary classification (e.g. if it uses a `sigmoid` last-layer activation).
warnings.warn('`model.predict_classes()` is deprecated and '
you are happy
image1 = Image.open("/content/drive/MyDrive/images/unclassifiedImages/Happy/Happy20.jpg")
plt.imshow(image1)
plt.show()
rgbImage = image1.resize((224,224),Image.ANTIALIAS).convert('RGB')
plt.imshow(rgbImage)
plt.show()
Xt = []
Xt.append(np.array(rgbImage))
# Convert to NP array
Xt = np.array(Xt)
# Reshape 2D
Xt = Xt.reshape(Xt.shape[0], 224, 224, 3).astype('float32')
# Normalize the data
Xt = Xt /255
result = model3.predict_classes(Xt)
#result = np.argmax(modelC.predict(Xt))
plt.imshow(image1)
plt.show()
if result[0] == 1:
print("You are angry")
if result[0] == 2:
print("You are disgusted")
if result[0] == 3:
print("you are fear")
if result[0] == 4:
print("you are happy")
if result[0] == 5:
print("You are netural")
if result[0] == 6:
print("You are sad")
if result[0] == 7:
print("You are surprised")
/usr/local/lib/python3.7/dist-packages/tensorflow/python/keras/engine/sequential.py:450: UserWarning: `model.predict_classes()` is deprecated and will be removed after 2021-01-01. Please use instead:* `np.argmax(model.predict(x), axis=-1)`, if your model does multi-class classification (e.g. if it uses a `softmax` last-layer activation).* `(model.predict(x) > 0.5).astype("int32")`, if your model does binary classification (e.g. if it uses a `sigmoid` last-layer activation).
warnings.warn('`model.predict_classes()` is deprecated and '
you are happy
Neutral
image1 = Image.open("/content/drive/MyDrive/images/unclassifiedImages/Neutral/Neutral1.jpg")
plt.imshow(image1)
plt.show()
rgbImage = image1.resize((224,224),Image.ANTIALIAS).convert('RGB')
plt.imshow(rgbImage)
plt.show()
Xt = []
Xt.append(np.array(rgbImage))
# Convert to NP array
Xt = np.array(Xt)
# Reshape 2D
Xt = Xt.reshape(Xt.shape[0], 224, 224, 3).astype('float32')
# Normalize the data
Xt = Xt /255
result = model3.predict_classes(Xt)
#result = np.argmax(modelC.predict(Xt))
plt.imshow(image1)
plt.show()
if result[0] == 1:
print("You are angry")
if result[0] == 2:
print("You are disgusted")
if result[0] == 3:
print("you are fear")
if result[0] == 4:
print("you are happy")
if result[0] == 5:
print("You are netural")
if result[0] == 6:
print("You are sad")
if result[0] == 7:
print("You are surprised")
/usr/local/lib/python3.7/dist-packages/tensorflow/python/keras/engine/sequential.py:450: UserWarning: `model.predict_classes()` is deprecated and will be removed after 2021-01-01. Please use instead:* `np.argmax(model.predict(x), axis=-1)`, if your model does multi-class classification (e.g. if it uses a `softmax` last-layer activation).* `(model.predict(x) > 0.5).astype("int32")`, if your model does binary classification (e.g. if it uses a `sigmoid` last-layer activation).
warnings.warn('`model.predict_classes()` is deprecated and '
You are sad
image1 = Image.open("/content/drive/MyDrive/images/unclassifiedImages/Neutral/Neutral2.jpg")
plt.imshow(image1)
plt.show()
rgbImage = image1.resize((224,224),Image.ANTIALIAS).convert('RGB')
plt.imshow(rgbImage)
plt.show()
Xt = []
Xt.append(np.array(rgbImage))
# Convert to NP array
Xt = np.array(Xt)
# Reshape 2D
Xt = Xt.reshape(Xt.shape[0], 224, 224, 3).astype('float32')
# Normalize the data
Xt = Xt /255
result = model3.predict_classes(Xt)
#result = np.argmax(modelC.predict(Xt))
plt.imshow(image1)
plt.show()
if result[0] == 1:
print("You are angry")
if result[0] == 2:
print("You are disgusted")
if result[0] == 3:
print("you are fear")
if result[0] == 4:
print("you are happy")
if result[0] == 5:
print("You are netural")
if result[0] == 6:
print("You are sad")
if result[0] == 7:
print("You are surprised")
/usr/local/lib/python3.7/dist-packages/tensorflow/python/keras/engine/sequential.py:450: UserWarning: `model.predict_classes()` is deprecated and will be removed after 2021-01-01. Please use instead:* `np.argmax(model.predict(x), axis=-1)`, if your model does multi-class classification (e.g. if it uses a `softmax` last-layer activation).* `(model.predict(x) > 0.5).astype("int32")`, if your model does binary classification (e.g. if it uses a `sigmoid` last-layer activation).
warnings.warn('`model.predict_classes()` is deprecated and '
You are sad
image1 = Image.open("/content/drive/MyDrive/images/unclassifiedImages/Neutral/Neutral3.jpg")
plt.imshow(image1)
plt.show()
rgbImage = image1.resize((224,224),Image.ANTIALIAS).convert('RGB')
plt.imshow(rgbImage)
plt.show()
Xt = []
Xt.append(np.array(rgbImage))
# Convert to NP array
Xt = np.array(Xt)
# Reshape 2D
Xt = Xt.reshape(Xt.shape[0], 224, 224, 3).astype('float32')
# Normalize the data
Xt = Xt /255
result = model3.predict_classes(Xt)
#result = np.argmax(modelC.predict(Xt))
plt.imshow(image1)
plt.show()
if result[0] == 1:
print("You are angry")
if result[0] == 2:
print("You are disgusted")
if result[0] == 3:
print("you are fear")
if result[0] == 4:
print("you are happy")
if result[0] == 5:
print("You are netural")
if result[0] == 6:
print("You are sad")
if result[0] == 7:
print("You are surprised")
/usr/local/lib/python3.7/dist-packages/tensorflow/python/keras/engine/sequential.py:450: UserWarning: `model.predict_classes()` is deprecated and will be removed after 2021-01-01. Please use instead:* `np.argmax(model.predict(x), axis=-1)`, if your model does multi-class classification (e.g. if it uses a `softmax` last-layer activation).* `(model.predict(x) > 0.5).astype("int32")`, if your model does binary classification (e.g. if it uses a `sigmoid` last-layer activation).
warnings.warn('`model.predict_classes()` is deprecated and '
You are surprised
image1 = Image.open("/content/drive/MyDrive/images/unclassifiedImages/Neutral/Neutral4.jpg")
plt.imshow(image1)
plt.show()
rgbImage = image1.resize((224,224),Image.ANTIALIAS).convert('RGB')
plt.imshow(rgbImage)
plt.show()
Xt = []
Xt.append(np.array(rgbImage))
# Convert to NP array
Xt = np.array(Xt)
# Reshape 2D
Xt = Xt.reshape(Xt.shape[0], 224, 224, 3).astype('float32')
# Normalize the data
Xt = Xt /255
result = model3.predict_classes(Xt)
#result = np.argmax(modelC.predict(Xt))
plt.imshow(image1)
plt.show()
if result[0] == 1:
print("You are angry")
if result[0] == 2:
print("You are disgusted")
if result[0] == 3:
print("you are fear")
if result[0] == 4:
print("you are happy")
if result[0] == 5:
print("You are netural")
if result[0] == 6:
print("You are sad")
if result[0] == 7:
print("You are surprised")
/usr/local/lib/python3.7/dist-packages/tensorflow/python/keras/engine/sequential.py:450: UserWarning: `model.predict_classes()` is deprecated and will be removed after 2021-01-01. Please use instead:* `np.argmax(model.predict(x), axis=-1)`, if your model does multi-class classification (e.g. if it uses a `softmax` last-layer activation).* `(model.predict(x) > 0.5).astype("int32")`, if your model does binary classification (e.g. if it uses a `sigmoid` last-layer activation).
warnings.warn('`model.predict_classes()` is deprecated and '
you are happy
image1 = Image.open("/content/drive/MyDrive/images/unclassifiedImages/Neutral/Neutral5.jpg")
plt.imshow(image1)
plt.show()
rgbImage = image1.resize((224,224),Image.ANTIALIAS).convert('RGB')
plt.imshow(rgbImage)
plt.show()
Xt = []
Xt.append(np.array(rgbImage))
# Convert to NP array
Xt = np.array(Xt)
# Reshape 2D
Xt = Xt.reshape(Xt.shape[0], 224, 224, 3).astype('float32')
# Normalize the data
Xt = Xt /255
result = model3.predict_classes(Xt)
#result = np.argmax(modelC.predict(Xt))
plt.imshow(image1)
plt.show()
if result[0] == 1:
print("You are angry")
if result[0] == 2:
print("You are disgusted")
if result[0] == 3:
print("you are fear")
if result[0] == 4:
print("you are happy")
if result[0] == 5:
print("You are netural")
if result[0] == 6:
print("You are sad")
if result[0] == 7:
print("You are surprised")
/usr/local/lib/python3.7/dist-packages/tensorflow/python/keras/engine/sequential.py:450: UserWarning: `model.predict_classes()` is deprecated and will be removed after 2021-01-01. Please use instead:* `np.argmax(model.predict(x), axis=-1)`, if your model does multi-class classification (e.g. if it uses a `softmax` last-layer activation).* `(model.predict(x) > 0.5).astype("int32")`, if your model does binary classification (e.g. if it uses a `sigmoid` last-layer activation).
warnings.warn('`model.predict_classes()` is deprecated and '
you are fear
image1 = Image.open("/content/drive/MyDrive/images/unclassifiedImages/Neutral/Neutral6.jpg")
plt.imshow(image1)
plt.show()
rgbImage = image1.resize((224,224),Image.ANTIALIAS).convert('RGB')
plt.imshow(rgbImage)
plt.show()
Xt = []
Xt.append(np.array(rgbImage))
# Convert to NP array
Xt = np.array(Xt)
# Reshape 2D
Xt = Xt.reshape(Xt.shape[0], 224, 224, 3).astype('float32')
# Normalize the data
Xt = Xt /255
result = model3.predict_classes(Xt)
#result = np.argmax(modelC.predict(Xt))
plt.imshow(image1)
plt.show()
if result[0] == 1:
print("You are angry")
if result[0] == 2:
print("You are disgusted")
if result[0] == 3:
print("you are fear")
if result[0] == 4:
print("you are happy")
if result[0] == 5:
print("You are netural")
if result[0] == 6:
print("You are sad")
if result[0] == 7:
print("You are surprised")
/usr/local/lib/python3.7/dist-packages/tensorflow/python/keras/engine/sequential.py:450: UserWarning: `model.predict_classes()` is deprecated and will be removed after 2021-01-01. Please use instead:* `np.argmax(model.predict(x), axis=-1)`, if your model does multi-class classification (e.g. if it uses a `softmax` last-layer activation).* `(model.predict(x) > 0.5).astype("int32")`, if your model does binary classification (e.g. if it uses a `sigmoid` last-layer activation).
warnings.warn('`model.predict_classes()` is deprecated and '
you are happy
image1 = Image.open("/content/drive/MyDrive/images/unclassifiedImages/Neutral/Neutral7.jpg")
plt.imshow(image1)
plt.show()
rgbImage = image1.resize((224,224),Image.ANTIALIAS).convert('RGB')
plt.imshow(rgbImage)
plt.show()
Xt = []
Xt.append(np.array(rgbImage))
# Convert to NP array
Xt = np.array(Xt)
# Reshape 2D
Xt = Xt.reshape(Xt.shape[0], 224, 224, 3).astype('float32')
# Normalize the data
Xt = Xt /255
result = model3.predict_classes(Xt)
#result = np.argmax(modelC.predict(Xt))
plt.imshow(image1)
plt.show()
if result[0] == 1:
print("You are angry")
if result[0] == 2:
print("You are disgusted")
if result[0] == 3:
print("you are fear")
if result[0] == 4:
print("you are happy")
if result[0] == 5:
print("You are netural")
if result[0] == 6:
print("You are sad")
if result[0] == 7:
print("You are surprised")
/usr/local/lib/python3.7/dist-packages/tensorflow/python/keras/engine/sequential.py:450: UserWarning: `model.predict_classes()` is deprecated and will be removed after 2021-01-01. Please use instead:* `np.argmax(model.predict(x), axis=-1)`, if your model does multi-class classification (e.g. if it uses a `softmax` last-layer activation).* `(model.predict(x) > 0.5).astype("int32")`, if your model does binary classification (e.g. if it uses a `sigmoid` last-layer activation).
warnings.warn('`model.predict_classes()` is deprecated and '
you are fear
image1 = Image.open("/content/drive/MyDrive/images/unclassifiedImages/Neutral/Neutral8.jpg")
plt.imshow(image1)
plt.show()
rgbImage = image1.resize((224,224),Image.ANTIALIAS).convert('RGB')
plt.imshow(rgbImage)
plt.show()
Xt = []
Xt.append(np.array(rgbImage))
# Convert to NP array
Xt = np.array(Xt)
# Reshape 2D
Xt = Xt.reshape(Xt.shape[0], 224, 224, 3).astype('float32')
# Normalize the data
Xt = Xt /255
result = model3.predict_classes(Xt)
#result = np.argmax(modelC.predict(Xt))
plt.imshow(image1)
plt.show()
if result[0] == 1:
print("You are angry")
if result[0] == 2:
print("You are disgusted")
if result[0] == 3:
print("you are fear")
if result[0] == 4:
print("you are happy")
if result[0] == 5:
print("You are netural")
if result[0] == 6:
print("You are sad")
if result[0] == 7:
print("You are surprised")
/usr/local/lib/python3.7/dist-packages/tensorflow/python/keras/engine/sequential.py:450: UserWarning: `model.predict_classes()` is deprecated and will be removed after 2021-01-01. Please use instead:* `np.argmax(model.predict(x), axis=-1)`, if your model does multi-class classification (e.g. if it uses a `softmax` last-layer activation).* `(model.predict(x) > 0.5).astype("int32")`, if your model does binary classification (e.g. if it uses a `sigmoid` last-layer activation).
warnings.warn('`model.predict_classes()` is deprecated and '
you are fear
image1 = Image.open("/content/drive/MyDrive/images/unclassifiedImages/Neutral/Neutral9.jpg")
plt.imshow(image1)
plt.show()
rgbImage = image1.resize((224,224),Image.ANTIALIAS).convert('RGB')
plt.imshow(rgbImage)
plt.show()
Xt = []
Xt.append(np.array(rgbImage))
# Convert to NP array
Xt = np.array(Xt)
# Reshape 2D
Xt = Xt.reshape(Xt.shape[0], 224, 224, 3).astype('float32')
# Normalize the data
Xt = Xt /255
result = model3.predict_classes(Xt)
#result = np.argmax(modelC.predict(Xt))
plt.imshow(image1)
plt.show()
if result[0] == 1:
print("You are angry")
if result[0] == 2:
print("You are disgusted")
if result[0] == 3:
print("you are fear")
if result[0] == 4:
print("you are happy")
if result[0] == 5:
print("You are netural")
if result[0] == 6:
print("You are sad")
if result[0] == 7:
print("You are surprised")
/usr/local/lib/python3.7/dist-packages/tensorflow/python/keras/engine/sequential.py:450: UserWarning: `model.predict_classes()` is deprecated and will be removed after 2021-01-01. Please use instead:* `np.argmax(model.predict(x), axis=-1)`, if your model does multi-class classification (e.g. if it uses a `softmax` last-layer activation).* `(model.predict(x) > 0.5).astype("int32")`, if your model does binary classification (e.g. if it uses a `sigmoid` last-layer activation).
warnings.warn('`model.predict_classes()` is deprecated and '
You are sad
image1 = Image.open("/content/drive/MyDrive/images/unclassifiedImages/Neutral/Neutral10.jpg")
plt.imshow(image1)
plt.show()
rgbImage = image1.resize((224,224),Image.ANTIALIAS).convert('RGB')
plt.imshow(rgbImage)
plt.show()
Xt = []
Xt.append(np.array(rgbImage))
# Convert to NP array
Xt = np.array(Xt)
# Reshape 2D
Xt = Xt.reshape(Xt.shape[0], 224, 224, 3).astype('float32')
# Normalize the data
Xt = Xt /255
result = model3.predict_classes(Xt)
#result = np.argmax(modelC.predict(Xt))
plt.imshow(image1)
plt.show()
if result[0] == 1:
print("You are angry")
if result[0] == 2:
print("You are disgusted")
if result[0] == 3:
print("you are fear")
if result[0] == 4:
print("you are happy")
if result[0] == 5:
print("You are netural")
if result[0] == 6:
print("You are sad")
if result[0] == 7:
print("You are surprised")
/usr/local/lib/python3.7/dist-packages/tensorflow/python/keras/engine/sequential.py:450: UserWarning: `model.predict_classes()` is deprecated and will be removed after 2021-01-01. Please use instead:* `np.argmax(model.predict(x), axis=-1)`, if your model does multi-class classification (e.g. if it uses a `softmax` last-layer activation).* `(model.predict(x) > 0.5).astype("int32")`, if your model does binary classification (e.g. if it uses a `sigmoid` last-layer activation).
warnings.warn('`model.predict_classes()` is deprecated and '
you are happy
image1 = Image.open("/content/drive/MyDrive/images/unclassifiedImages/Neutral/Neutral11.jpg")
plt.imshow(image1)
plt.show()
rgbImage = image1.resize((224,224),Image.ANTIALIAS).convert('RGB')
plt.imshow(rgbImage)
plt.show()
Xt = []
Xt.append(np.array(rgbImage))
# Convert to NP array
Xt = np.array(Xt)
# Reshape 2D
Xt = Xt.reshape(Xt.shape[0], 224, 224, 3).astype('float32')
# Normalize the data
Xt = Xt /255
result = model3.predict_classes(Xt)
#result = np.argmax(modelC.predict(Xt))
plt.imshow(image1)
plt.show()
if result[0] == 1:
print("You are angry")
if result[0] == 2:
print("You are disgusted")
if result[0] == 3:
print("you are fear")
if result[0] == 4:
print("you are happy")
if result[0] == 5:
print("You are netural")
if result[0] == 6:
print("You are sad")
if result[0] == 7:
print("You are surprised")
/usr/local/lib/python3.7/dist-packages/tensorflow/python/keras/engine/sequential.py:450: UserWarning: `model.predict_classes()` is deprecated and will be removed after 2021-01-01. Please use instead:* `np.argmax(model.predict(x), axis=-1)`, if your model does multi-class classification (e.g. if it uses a `softmax` last-layer activation).* `(model.predict(x) > 0.5).astype("int32")`, if your model does binary classification (e.g. if it uses a `sigmoid` last-layer activation).
warnings.warn('`model.predict_classes()` is deprecated and '
you are happy
image1 = Image.open("/content/drive/MyDrive/images/unclassifiedImages/Neutral/Neutral12.jpg")
plt.imshow(image1)
plt.show()
rgbImage = image1.resize((224,224),Image.ANTIALIAS).convert('RGB')
plt.imshow(rgbImage)
plt.show()
Xt = []
Xt.append(np.array(rgbImage))
# Convert to NP array
Xt = np.array(Xt)
# Reshape 2D
Xt = Xt.reshape(Xt.shape[0], 224, 224, 3).astype('float32')
# Normalize the data
Xt = Xt /255
result = model3.predict_classes(Xt)
#result = np.argmax(modelC.predict(Xt))
plt.imshow(image1)
plt.show()
if result[0] == 1:
print("You are angry")
if result[0] == 2:
print("You are disgusted")
if result[0] == 3:
print("you are fear")
if result[0] == 4:
print("you are happy")
if result[0] == 5:
print("You are netural")
if result[0] == 6:
print("You are sad")
if result[0] == 7:
print("You are surprised")
/usr/local/lib/python3.7/dist-packages/tensorflow/python/keras/engine/sequential.py:450: UserWarning: `model.predict_classes()` is deprecated and will be removed after 2021-01-01. Please use instead:* `np.argmax(model.predict(x), axis=-1)`, if your model does multi-class classification (e.g. if it uses a `softmax` last-layer activation).* `(model.predict(x) > 0.5).astype("int32")`, if your model does binary classification (e.g. if it uses a `sigmoid` last-layer activation).
warnings.warn('`model.predict_classes()` is deprecated and '
you are happy
image1 = Image.open("/content/drive/MyDrive/images/unclassifiedImages/Neutral/Neutral13.jpg")
plt.imshow(image1)
plt.show()
rgbImage = image1.resize((224,224),Image.ANTIALIAS).convert('RGB')
plt.imshow(rgbImage)
plt.show()
Xt = []
Xt.append(np.array(rgbImage))
# Convert to NP array
Xt = np.array(Xt)
# Reshape 2D
Xt = Xt.reshape(Xt.shape[0], 224, 224, 3).astype('float32')
# Normalize the data
Xt = Xt /255
result = model3.predict_classes(Xt)
#result = np.argmax(modelC.predict(Xt))
plt.imshow(image1)
plt.show()
if result[0] == 1:
print("You are angry")
if result[0] == 2:
print("You are disgusted")
if result[0] == 3:
print("you are fear")
if result[0] == 4:
print("you are happy")
if result[0] == 5:
print("You are netural")
if result[0] == 6:
print("You are sad")
if result[0] == 7:
print("You are surprised")
/usr/local/lib/python3.7/dist-packages/tensorflow/python/keras/engine/sequential.py:450: UserWarning: `model.predict_classes()` is deprecated and will be removed after 2021-01-01. Please use instead:* `np.argmax(model.predict(x), axis=-1)`, if your model does multi-class classification (e.g. if it uses a `softmax` last-layer activation).* `(model.predict(x) > 0.5).astype("int32")`, if your model does binary classification (e.g. if it uses a `sigmoid` last-layer activation).
warnings.warn('`model.predict_classes()` is deprecated and '
you are happy
image1 = Image.open("/content/drive/MyDrive/images/unclassifiedImages/Neutral/Neutral14.jpg")
plt.imshow(image1)
plt.show()
rgbImage = image1.resize((224,224),Image.ANTIALIAS).convert('RGB')
plt.imshow(rgbImage)
plt.show()
Xt = []
Xt.append(np.array(rgbImage))
# Convert to NP array
Xt = np.array(Xt)
# Reshape 2D
Xt = Xt.reshape(Xt.shape[0], 224, 224, 3).astype('float32')
# Normalize the data
Xt = Xt /255
result = model3.predict_classes(Xt)
#result = np.argmax(modelC.predict(Xt))
plt.imshow(image1)
plt.show()
if result[0] == 1:
print("You are angry")
if result[0] == 2:
print("You are disgusted")
if result[0] == 3:
print("you are fear")
if result[0] == 4:
print("you are happy")
if result[0] == 5:
print("You are netural")
if result[0] == 6:
print("You are sad")
if result[0] == 7:
print("You are surprised")
/usr/local/lib/python3.7/dist-packages/tensorflow/python/keras/engine/sequential.py:450: UserWarning: `model.predict_classes()` is deprecated and will be removed after 2021-01-01. Please use instead:* `np.argmax(model.predict(x), axis=-1)`, if your model does multi-class classification (e.g. if it uses a `softmax` last-layer activation).* `(model.predict(x) > 0.5).astype("int32")`, if your model does binary classification (e.g. if it uses a `sigmoid` last-layer activation).
warnings.warn('`model.predict_classes()` is deprecated and '
you are happy
image1 = Image.open("/content/drive/MyDrive/images/unclassifiedImages/Neutral/Neutral15.jpg")
plt.imshow(image1)
plt.show()
rgbImage = image1.resize((224,224),Image.ANTIALIAS).convert('RGB')
plt.imshow(rgbImage)
plt.show()
Xt = []
Xt.append(np.array(rgbImage))
# Convert to NP array
Xt = np.array(Xt)
# Reshape 2D
Xt = Xt.reshape(Xt.shape[0], 224, 224, 3).astype('float32')
# Normalize the data
Xt = Xt /255
result = model3.predict_classes(Xt)
#result = np.argmax(modelC.predict(Xt))
plt.imshow(image1)
plt.show()
if result[0] == 1:
print("You are angry")
if result[0] == 2:
print("You are disgusted")
if result[0] == 3:
print("you are fear")
if result[0] == 4:
print("you are happy")
if result[0] == 5:
print("You are netural")
if result[0] == 6:
print("You are sad")
if result[0] == 7:
print("You are surprised")
/usr/local/lib/python3.7/dist-packages/tensorflow/python/keras/engine/sequential.py:450: UserWarning: `model.predict_classes()` is deprecated and will be removed after 2021-01-01. Please use instead:* `np.argmax(model.predict(x), axis=-1)`, if your model does multi-class classification (e.g. if it uses a `softmax` last-layer activation).* `(model.predict(x) > 0.5).astype("int32")`, if your model does binary classification (e.g. if it uses a `sigmoid` last-layer activation).
warnings.warn('`model.predict_classes()` is deprecated and '
You are surprised
image1 = Image.open("/content/drive/MyDrive/images/unclassifiedImages/Neutral/Neutral16.jpg")
plt.imshow(image1)
plt.show()
rgbImage = image1.resize((224,224),Image.ANTIALIAS).convert('RGB')
plt.imshow(rgbImage)
plt.show()
Xt = []
Xt.append(np.array(rgbImage))
# Convert to NP array
Xt = np.array(Xt)
# Reshape 2D
Xt = Xt.reshape(Xt.shape[0], 224, 224, 3).astype('float32')
# Normalize the data
Xt = Xt /255
result = model3.predict_classes(Xt)
#result = np.argmax(modelC.predict(Xt))
plt.imshow(image1)
plt.show()
if result[0] == 1:
print("You are angry")
if result[0] == 2:
print("You are disgusted")
if result[0] == 3:
print("you are fear")
if result[0] == 4:
print("you are happy")
if result[0] == 5:
print("You are netural")
if result[0] == 6:
print("You are sad")
if result[0] == 7:
print("You are surprised")
/usr/local/lib/python3.7/dist-packages/tensorflow/python/keras/engine/sequential.py:450: UserWarning: `model.predict_classes()` is deprecated and will be removed after 2021-01-01. Please use instead:* `np.argmax(model.predict(x), axis=-1)`, if your model does multi-class classification (e.g. if it uses a `softmax` last-layer activation).* `(model.predict(x) > 0.5).astype("int32")`, if your model does binary classification (e.g. if it uses a `sigmoid` last-layer activation).
warnings.warn('`model.predict_classes()` is deprecated and '
you are happy
image1 = Image.open("/content/drive/MyDrive/images/unclassifiedImages/Neutral/Neutral17.jpg")
plt.imshow(image1)
plt.show()
rgbImage = image1.resize((224,224),Image.ANTIALIAS).convert('RGB')
plt.imshow(rgbImage)
plt.show()
Xt = []
Xt.append(np.array(rgbImage))
# Convert to NP array
Xt = np.array(Xt)
# Reshape 2D
Xt = Xt.reshape(Xt.shape[0], 224, 224, 3).astype('float32')
# Normalize the data
Xt = Xt /255
result = model3.predict_classes(Xt)
#result = np.argmax(modelC.predict(Xt))
plt.imshow(image1)
plt.show()
if result[0] == 1:
print("You are angry")
if result[0] == 2:
print("You are disgusted")
if result[0] == 3:
print("you are fear")
if result[0] == 4:
print("you are happy")
if result[0] == 5:
print("You are netural")
if result[0] == 6:
print("You are sad")
if result[0] == 7:
print("You are surprised")
/usr/local/lib/python3.7/dist-packages/tensorflow/python/keras/engine/sequential.py:450: UserWarning: `model.predict_classes()` is deprecated and will be removed after 2021-01-01. Please use instead:* `np.argmax(model.predict(x), axis=-1)`, if your model does multi-class classification (e.g. if it uses a `softmax` last-layer activation).* `(model.predict(x) > 0.5).astype("int32")`, if your model does binary classification (e.g. if it uses a `sigmoid` last-layer activation).
warnings.warn('`model.predict_classes()` is deprecated and '
You are surprised
image1 = Image.open("/content/drive/MyDrive/images/unclassifiedImages/Neutral/Neutral18.jpg")
plt.imshow(image1)
plt.show()
rgbImage = image1.resize((224,224),Image.ANTIALIAS).convert('RGB')
plt.imshow(rgbImage)
plt.show()
Xt = []
Xt.append(np.array(rgbImage))
# Convert to NP array
Xt = np.array(Xt)
# Reshape 2D
Xt = Xt.reshape(Xt.shape[0], 224, 224, 3).astype('float32')
# Normalize the data
Xt = Xt /255
result = model3.predict_classes(Xt)
#result = np.argmax(modelC.predict(Xt))
plt.imshow(image1)
plt.show()
if result[0] == 1:
print("You are angry")
if result[0] == 2:
print("You are disgusted")
if result[0] == 3:
print("you are fear")
if result[0] == 4:
print("you are happy")
if result[0] == 5:
print("You are netural")
if result[0] == 6:
print("You are sad")
if result[0] == 7:
print("You are surprised")
/usr/local/lib/python3.7/dist-packages/tensorflow/python/keras/engine/sequential.py:450: UserWarning: `model.predict_classes()` is deprecated and will be removed after 2021-01-01. Please use instead:* `np.argmax(model.predict(x), axis=-1)`, if your model does multi-class classification (e.g. if it uses a `softmax` last-layer activation).* `(model.predict(x) > 0.5).astype("int32")`, if your model does binary classification (e.g. if it uses a `sigmoid` last-layer activation).
warnings.warn('`model.predict_classes()` is deprecated and '
You are surprised
image1 = Image.open("/content/drive/MyDrive/images/unclassifiedImages/Neutral/Neutral19.jpg")
plt.imshow(image1)
plt.show()
rgbImage = image1.resize((224,224),Image.ANTIALIAS).convert('RGB')
plt.imshow(rgbImage)
plt.show()
Xt = []
Xt.append(np.array(rgbImage))
# Convert to NP array
Xt = np.array(Xt)
# Reshape 2D
Xt = Xt.reshape(Xt.shape[0], 224, 224, 3).astype('float32')
# Normalize the data
Xt = Xt /255
result = model3.predict_classes(Xt)
#result = np.argmax(modelC.predict(Xt))
plt.imshow(image1)
plt.show()
if result[0] == 1:
print("You are angry")
if result[0] == 2:
print("You are disgusted")
if result[0] == 3:
print("you are fear")
if result[0] == 4:
print("you are happy")
if result[0] == 5:
print("You are netural")
if result[0] == 6:
print("You are sad")
if result[0] == 7:
print("You are surprised")
/usr/local/lib/python3.7/dist-packages/tensorflow/python/keras/engine/sequential.py:450: UserWarning: `model.predict_classes()` is deprecated and will be removed after 2021-01-01. Please use instead:* `np.argmax(model.predict(x), axis=-1)`, if your model does multi-class classification (e.g. if it uses a `softmax` last-layer activation).* `(model.predict(x) > 0.5).astype("int32")`, if your model does binary classification (e.g. if it uses a `sigmoid` last-layer activation).
warnings.warn('`model.predict_classes()` is deprecated and '
you are happy
image1 = Image.open("/content/drive/MyDrive/images/unclassifiedImages/Neutral/Neutral20.jpg")
plt.imshow(image1)
plt.show()
rgbImage = image1.resize((224,224),Image.ANTIALIAS).convert('RGB')
plt.imshow(rgbImage)
plt.show()
Xt = []
Xt.append(np.array(rgbImage))
# Convert to NP array
Xt = np.array(Xt)
# Reshape 2D
Xt = Xt.reshape(Xt.shape[0], 224, 224, 3).astype('float32')
# Normalize the data
Xt = Xt /255
result = model3.predict_classes(Xt)
#result = np.argmax(modelC.predict(Xt))
plt.imshow(image1)
plt.show()
if result[0] == 1:
print("You are angry")
if result[0] == 2:
print("You are disgusted")
if result[0] == 3:
print("you are fear")
if result[0] == 4:
print("you are happy")
if result[0] == 5:
print("You are netural")
if result[0] == 6:
print("You are sad")
if result[0] == 7:
print("You are surprised")
/usr/local/lib/python3.7/dist-packages/tensorflow/python/keras/engine/sequential.py:450: UserWarning: `model.predict_classes()` is deprecated and will be removed after 2021-01-01. Please use instead:* `np.argmax(model.predict(x), axis=-1)`, if your model does multi-class classification (e.g. if it uses a `softmax` last-layer activation).* `(model.predict(x) > 0.5).astype("int32")`, if your model does binary classification (e.g. if it uses a `sigmoid` last-layer activation).
warnings.warn('`model.predict_classes()` is deprecated and '
You are surprised
Sad
image1 = Image.open("/content/drive/MyDrive/images/unclassifiedImages/Sad/Sad1.jpg")
plt.imshow(image1)
plt.show()
rgbImage = image1.resize((224,224),Image.ANTIALIAS).convert('RGB')
plt.imshow(rgbImage)
plt.show()
Xt = []
Xt.append(np.array(rgbImage))
# Convert to NP array
Xt = np.array(Xt)
# Reshape 2D
Xt = Xt.reshape(Xt.shape[0], 224, 224, 3).astype('float32')
# Normalize the data
Xt = Xt /255
result = model3.predict_classes(Xt)
#result = np.argmax(modelC.predict(Xt))
plt.imshow(image1)
plt.show()
if result[0] == 1:
print("You are angry")
if result[0] == 2:
print("You are disgusted")
if result[0] == 3:
print("you are fear")
if result[0] == 4:
print("you are happy")
if result[0] == 5:
print("You are netural")
if result[0] == 6:
print("You are sad")
if result[0] == 7:
print("You are surprised")
/usr/local/lib/python3.7/dist-packages/tensorflow/python/keras/engine/sequential.py:450: UserWarning: `model.predict_classes()` is deprecated and will be removed after 2021-01-01. Please use instead:* `np.argmax(model.predict(x), axis=-1)`, if your model does multi-class classification (e.g. if it uses a `softmax` last-layer activation).* `(model.predict(x) > 0.5).astype("int32")`, if your model does binary classification (e.g. if it uses a `sigmoid` last-layer activation).
warnings.warn('`model.predict_classes()` is deprecated and '
you are happy
image1 = Image.open("/content/drive/MyDrive/images/unclassifiedImages/Sad/Sad2.jpg")
plt.imshow(image1)
plt.show()
rgbImage = image1.resize((224,224),Image.ANTIALIAS).convert('RGB')
plt.imshow(rgbImage)
plt.show()
Xt = []
Xt.append(np.array(rgbImage))
# Convert to NP array
Xt = np.array(Xt)
# Reshape 2D
Xt = Xt.reshape(Xt.shape[0], 224, 224, 3).astype('float32')
# Normalize the data
Xt = Xt /255
result = model3.predict_classes(Xt)
#result = np.argmax(modelC.predict(Xt))
plt.imshow(image1)
plt.show()
if result[0] == 1:
print("You are angry")
if result[0] == 2:
print("You are disgusted")
if result[0] == 3:
print("you are fear")
if result[0] == 4:
print("you are happy")
if result[0] == 5:
print("You are netural")
if result[0] == 6:
print("You are sad")
if result[0] == 7:
print("You are surprised")
/usr/local/lib/python3.7/dist-packages/tensorflow/python/keras/engine/sequential.py:450: UserWarning: `model.predict_classes()` is deprecated and will be removed after 2021-01-01. Please use instead:* `np.argmax(model.predict(x), axis=-1)`, if your model does multi-class classification (e.g. if it uses a `softmax` last-layer activation).* `(model.predict(x) > 0.5).astype("int32")`, if your model does binary classification (e.g. if it uses a `sigmoid` last-layer activation).
warnings.warn('`model.predict_classes()` is deprecated and '
you are happy
image1 = Image.open("/content/drive/MyDrive/images/unclassifiedImages/Sad/Sad3.jpg")
plt.imshow(image1)
plt.show()
rgbImage = image1.resize((224,224),Image.ANTIALIAS).convert('RGB')
plt.imshow(rgbImage)
plt.show()
Xt = []
Xt.append(np.array(rgbImage))
# Convert to NP array
Xt = np.array(Xt)
# Reshape 2D
Xt = Xt.reshape(Xt.shape[0], 224, 224, 3).astype('float32')
# Normalize the data
Xt = Xt /255
result = model3.predict_classes(Xt)
#result = np.argmax(modelC.predict(Xt))
plt.imshow(image1)
plt.show()
if result[0] == 1:
print("You are angry")
if result[0] == 2:
print("You are disgusted")
if result[0] == 3:
print("you are fear")
if result[0] == 4:
print("you are happy")
if result[0] == 5:
print("You are netural")
if result[0] == 6:
print("You are sad")
if result[0] == 7:
print("You are surprised")
/usr/local/lib/python3.7/dist-packages/tensorflow/python/keras/engine/sequential.py:450: UserWarning: `model.predict_classes()` is deprecated and will be removed after 2021-01-01. Please use instead:* `np.argmax(model.predict(x), axis=-1)`, if your model does multi-class classification (e.g. if it uses a `softmax` last-layer activation).* `(model.predict(x) > 0.5).astype("int32")`, if your model does binary classification (e.g. if it uses a `sigmoid` last-layer activation).
warnings.warn('`model.predict_classes()` is deprecated and '
You are sad
image1 = Image.open("/content/drive/MyDrive/images/unclassifiedImages/Sad/Sad4.jpg")
plt.imshow(image1)
plt.show()
rgbImage = image1.resize((224,224),Image.ANTIALIAS).convert('RGB')
plt.imshow(rgbImage)
plt.show()
Xt = []
Xt.append(np.array(rgbImage))
# Convert to NP array
Xt = np.array(Xt)
# Reshape 2D
Xt = Xt.reshape(Xt.shape[0], 224, 224, 3).astype('float32')
# Normalize the data
Xt = Xt /255
result = model3.predict_classes(Xt)
#result = np.argmax(modelC.predict(Xt))
plt.imshow(image1)
plt.show()
if result[0] == 1:
print("You are angry")
if result[0] == 2:
print("You are disgusted")
if result[0] == 3:
print("you are fear")
if result[0] == 4:
print("you are happy")
if result[0] == 5:
print("You are netural")
if result[0] == 6:
print("You are sad")
if result[0] == 7:
print("You are surprised")
/usr/local/lib/python3.7/dist-packages/tensorflow/python/keras/engine/sequential.py:450: UserWarning: `model.predict_classes()` is deprecated and will be removed after 2021-01-01. Please use instead:* `np.argmax(model.predict(x), axis=-1)`, if your model does multi-class classification (e.g. if it uses a `softmax` last-layer activation).* `(model.predict(x) > 0.5).astype("int32")`, if your model does binary classification (e.g. if it uses a `sigmoid` last-layer activation).
warnings.warn('`model.predict_classes()` is deprecated and '
You are angry
image1 = Image.open("/content/drive/MyDrive/images/unclassifiedImages/Sad/Sad5.jpg")
plt.imshow(image1)
plt.show()
rgbImage = image1.resize((224,224),Image.ANTIALIAS).convert('RGB')
plt.imshow(rgbImage)
plt.show()
Xt = []
Xt.append(np.array(rgbImage))
# Convert to NP array
Xt = np.array(Xt)
# Reshape 2D
Xt = Xt.reshape(Xt.shape[0], 224, 224, 3).astype('float32')
# Normalize the data
Xt = Xt /255
result = model3.predict_classes(Xt)
#result = np.argmax(modelC.predict(Xt))
plt.imshow(image1)
plt.show()
if result[0] == 1:
print("You are angry")
if result[0] == 2:
print("You are disgusted")
if result[0] == 3:
print("you are fear")
if result[0] == 4:
print("you are happy")
if result[0] == 5:
print("You are netural")
if result[0] == 6:
print("You are sad")
if result[0] == 7:
print("You are surprised")
/usr/local/lib/python3.7/dist-packages/tensorflow/python/keras/engine/sequential.py:450: UserWarning: `model.predict_classes()` is deprecated and will be removed after 2021-01-01. Please use instead:* `np.argmax(model.predict(x), axis=-1)`, if your model does multi-class classification (e.g. if it uses a `softmax` last-layer activation).* `(model.predict(x) > 0.5).astype("int32")`, if your model does binary classification (e.g. if it uses a `sigmoid` last-layer activation).
warnings.warn('`model.predict_classes()` is deprecated and '
You are angry
image1 = Image.open("/content/drive/MyDrive/images/unclassifiedImages/Sad/Sad6.jpg")
plt.imshow(image1)
plt.show()
rgbImage = image1.resize((224,224),Image.ANTIALIAS).convert('RGB')
plt.imshow(rgbImage)
plt.show()
Xt = []
Xt.append(np.array(rgbImage))
# Convert to NP array
Xt = np.array(Xt)
# Reshape 2D
Xt = Xt.reshape(Xt.shape[0], 224, 224, 3).astype('float32')
# Normalize the data
Xt = Xt /255
result = model3.predict_classes(Xt)
#result = np.argmax(modelC.predict(Xt))
plt.imshow(image1)
plt.show()
if result[0] == 1:
print("You are angry")
if result[0] == 2:
print("You are disgusted")
if result[0] == 3:
print("you are fear")
if result[0] == 4:
print("you are happy")
if result[0] == 5:
print("You are netural")
if result[0] == 6:
print("You are sad")
if result[0] == 7:
print("You are surprised")
/usr/local/lib/python3.7/dist-packages/tensorflow/python/keras/engine/sequential.py:450: UserWarning: `model.predict_classes()` is deprecated and will be removed after 2021-01-01. Please use instead:* `np.argmax(model.predict(x), axis=-1)`, if your model does multi-class classification (e.g. if it uses a `softmax` last-layer activation).* `(model.predict(x) > 0.5).astype("int32")`, if your model does binary classification (e.g. if it uses a `sigmoid` last-layer activation).
warnings.warn('`model.predict_classes()` is deprecated and '
you are happy
image1 = Image.open("/content/drive/MyDrive/images/unclassifiedImages/Sad/Sad7.jpg")
plt.imshow(image1)
plt.show()
rgbImage = image1.resize((224,224),Image.ANTIALIAS).convert('RGB')
plt.imshow(rgbImage)
plt.show()
Xt = []
Xt.append(np.array(rgbImage))
# Convert to NP array
Xt = np.array(Xt)
# Reshape 2D
Xt = Xt.reshape(Xt.shape[0], 224, 224, 3).astype('float32')
# Normalize the data
Xt = Xt /255
result = model3.predict_classes(Xt)
#result = np.argmax(modelC.predict(Xt))
plt.imshow(image1)
plt.show()
if result[0] == 1:
print("You are angry")
if result[0] == 2:
print("You are disgusted")
if result[0] == 3:
print("you are fear")
if result[0] == 4:
print("you are happy")
if result[0] == 5:
print("You are netural")
if result[0] == 6:
print("You are sad")
if result[0] == 7:
print("You are surprised")
/usr/local/lib/python3.7/dist-packages/tensorflow/python/keras/engine/sequential.py:450: UserWarning: `model.predict_classes()` is deprecated and will be removed after 2021-01-01. Please use instead:* `np.argmax(model.predict(x), axis=-1)`, if your model does multi-class classification (e.g. if it uses a `softmax` last-layer activation).* `(model.predict(x) > 0.5).astype("int32")`, if your model does binary classification (e.g. if it uses a `sigmoid` last-layer activation).
warnings.warn('`model.predict_classes()` is deprecated and '
you are happy
image1 = Image.open("/content/drive/MyDrive/images/unclassifiedImages/Sad/Sad8.jpg")
plt.imshow(image1)
plt.show()
rgbImage = image1.resize((224,224),Image.ANTIALIAS).convert('RGB')
plt.imshow(rgbImage)
plt.show()
Xt = []
Xt.append(np.array(rgbImage))
# Convert to NP array
Xt = np.array(Xt)
# Reshape 2D
Xt = Xt.reshape(Xt.shape[0], 224, 224, 3).astype('float32')
# Normalize the data
Xt = Xt /255
result = model3.predict_classes(Xt)
#result = np.argmax(modelC.predict(Xt))
plt.imshow(image1)
plt.show()
if result[0] == 1:
print("You are angry")
if result[0] == 2:
print("You are disgusted")
if result[0] == 3:
print("you are fear")
if result[0] == 4:
print("you are happy")
if result[0] == 5:
print("You are netural")
if result[0] == 6:
print("You are sad")
if result[0] == 7:
print("You are surprised")
/usr/local/lib/python3.7/dist-packages/tensorflow/python/keras/engine/sequential.py:450: UserWarning: `model.predict_classes()` is deprecated and will be removed after 2021-01-01. Please use instead:* `np.argmax(model.predict(x), axis=-1)`, if your model does multi-class classification (e.g. if it uses a `softmax` last-layer activation).* `(model.predict(x) > 0.5).astype("int32")`, if your model does binary classification (e.g. if it uses a `sigmoid` last-layer activation).
warnings.warn('`model.predict_classes()` is deprecated and '
you are happy
image1 = Image.open("/content/drive/MyDrive/images/unclassifiedImages/Sad/Sad9.jpg")
plt.imshow(image1)
plt.show()
rgbImage = image1.resize((224,224),Image.ANTIALIAS).convert('RGB')
plt.imshow(rgbImage)
plt.show()
Xt = []
Xt.append(np.array(rgbImage))
# Convert to NP array
Xt = np.array(Xt)
# Reshape 2D
Xt = Xt.reshape(Xt.shape[0], 224, 224, 3).astype('float32')
# Normalize the data
Xt = Xt /255
result = model3.predict_classes(Xt)
#result = np.argmax(modelC.predict(Xt))
plt.imshow(image1)
plt.show()
if result[0] == 1:
print("You are angry")
if result[0] == 2:
print("You are disgusted")
if result[0] == 3:
print("you are fear")
if result[0] == 4:
print("you are happy")
if result[0] == 5:
print("You are netural")
if result[0] == 6:
print("You are sad")
if result[0] == 7:
print("You are surprised")
/usr/local/lib/python3.7/dist-packages/tensorflow/python/keras/engine/sequential.py:450: UserWarning: `model.predict_classes()` is deprecated and will be removed after 2021-01-01. Please use instead:* `np.argmax(model.predict(x), axis=-1)`, if your model does multi-class classification (e.g. if it uses a `softmax` last-layer activation).* `(model.predict(x) > 0.5).astype("int32")`, if your model does binary classification (e.g. if it uses a `sigmoid` last-layer activation).
warnings.warn('`model.predict_classes()` is deprecated and '
You are surprised
image1 = Image.open("/content/drive/MyDrive/images/unclassifiedImages/Sad/Sad10.jpg")
plt.imshow(image1)
plt.show()
rgbImage = image1.resize((224,224),Image.ANTIALIAS).convert('RGB')
plt.imshow(rgbImage)
plt.show()
Xt = []
Xt.append(np.array(rgbImage))
# Convert to NP array
Xt = np.array(Xt)
# Reshape 2D
Xt = Xt.reshape(Xt.shape[0], 224, 224, 3).astype('float32')
# Normalize the data
Xt = Xt /255
result = model3.predict_classes(Xt)
#result = np.argmax(modelC.predict(Xt))
plt.imshow(image1)
plt.show()
if result[0] == 1:
print("You are angry")
if result[0] == 2:
print("You are disgusted")
if result[0] == 3:
print("you are fear")
if result[0] == 4:
print("you are happy")
if result[0] == 5:
print("You are netural")
if result[0] == 6:
print("You are sad")
if result[0] == 7:
print("You are surprised")
/usr/local/lib/python3.7/dist-packages/tensorflow/python/keras/engine/sequential.py:450: UserWarning: `model.predict_classes()` is deprecated and will be removed after 2021-01-01. Please use instead:* `np.argmax(model.predict(x), axis=-1)`, if your model does multi-class classification (e.g. if it uses a `softmax` last-layer activation).* `(model.predict(x) > 0.5).astype("int32")`, if your model does binary classification (e.g. if it uses a `sigmoid` last-layer activation).
warnings.warn('`model.predict_classes()` is deprecated and '
you are happy
image1 = Image.open("/content/drive/MyDrive/images/unclassifiedImages/Sad/Sad11.jpg")
plt.imshow(image1)
plt.show()
rgbImage = image1.resize((224,224),Image.ANTIALIAS).convert('RGB')
plt.imshow(rgbImage)
plt.show()
Xt = []
Xt.append(np.array(rgbImage))
# Convert to NP array
Xt = np.array(Xt)
# Reshape 2D
Xt = Xt.reshape(Xt.shape[0], 224, 224, 3).astype('float32')
# Normalize the data
Xt = Xt /255
result = model3.predict_classes(Xt)
#result = np.argmax(modelC.predict(Xt))
plt.imshow(image1)
plt.show()
if result[0] == 1:
print("You are angry")
if result[0] == 2:
print("You are disgusted")
if result[0] == 3:
print("you are fear")
if result[0] == 4:
print("you are happy")
if result[0] == 5:
print("You are netural")
if result[0] == 6:
print("You are sad")
if result[0] == 7:
print("You are surprised")
/usr/local/lib/python3.7/dist-packages/tensorflow/python/keras/engine/sequential.py:450: UserWarning: `model.predict_classes()` is deprecated and will be removed after 2021-01-01. Please use instead:* `np.argmax(model.predict(x), axis=-1)`, if your model does multi-class classification (e.g. if it uses a `softmax` last-layer activation).* `(model.predict(x) > 0.5).astype("int32")`, if your model does binary classification (e.g. if it uses a `sigmoid` last-layer activation).
warnings.warn('`model.predict_classes()` is deprecated and '
You are surprised
image1 = Image.open("/content/drive/MyDrive/images/unclassifiedImages/Sad/Sad12.jpg")
plt.imshow(image1)
plt.show()
rgbImage = image1.resize((224,224),Image.ANTIALIAS).convert('RGB')
plt.imshow(rgbImage)
plt.show()
Xt = []
Xt.append(np.array(rgbImage))
# Convert to NP array
Xt = np.array(Xt)
# Reshape 2D
Xt = Xt.reshape(Xt.shape[0], 224, 224, 3).astype('float32')
# Normalize the data
Xt = Xt /255
result = model3.predict_classes(Xt)
#result = np.argmax(modelC.predict(Xt))
plt.imshow(image1)
plt.show()
if result[0] == 1:
print("You are angry")
if result[0] == 2:
print("You are disgusted")
if result[0] == 3:
print("you are fear")
if result[0] == 4:
print("you are happy")
if result[0] == 5:
print("You are netural")
if result[0] == 6:
print("You are sad")
if result[0] == 7:
print("You are surprised")
/usr/local/lib/python3.7/dist-packages/tensorflow/python/keras/engine/sequential.py:450: UserWarning: `model.predict_classes()` is deprecated and will be removed after 2021-01-01. Please use instead:* `np.argmax(model.predict(x), axis=-1)`, if your model does multi-class classification (e.g. if it uses a `softmax` last-layer activation).* `(model.predict(x) > 0.5).astype("int32")`, if your model does binary classification (e.g. if it uses a `sigmoid` last-layer activation).
warnings.warn('`model.predict_classes()` is deprecated and '
You are surprised
image1 = Image.open("/content/drive/MyDrive/images/unclassifiedImages/Sad/Sad13.jpg")
plt.imshow(image1)
plt.show()
rgbImage = image1.resize((224,224),Image.ANTIALIAS).convert('RGB')
plt.imshow(rgbImage)
plt.show()
Xt = []
Xt.append(np.array(rgbImage))
# Convert to NP array
Xt = np.array(Xt)
# Reshape 2D
Xt = Xt.reshape(Xt.shape[0], 224, 224, 3).astype('float32')
# Normalize the data
Xt = Xt /255
result = model3.predict_classes(Xt)
#result = np.argmax(modelC.predict(Xt))
plt.imshow(image1)
plt.show()
if result[0] == 1:
print("You are angry")
if result[0] == 2:
print("You are disgusted")
if result[0] == 3:
print("you are fear")
if result[0] == 4:
print("you are happy")
if result[0] == 5:
print("You are netural")
if result[0] == 6:
print("You are sad")
if result[0] == 7:
print("You are surprised")
/usr/local/lib/python3.7/dist-packages/tensorflow/python/keras/engine/sequential.py:450: UserWarning: `model.predict_classes()` is deprecated and will be removed after 2021-01-01. Please use instead:* `np.argmax(model.predict(x), axis=-1)`, if your model does multi-class classification (e.g. if it uses a `softmax` last-layer activation).* `(model.predict(x) > 0.5).astype("int32")`, if your model does binary classification (e.g. if it uses a `sigmoid` last-layer activation).
warnings.warn('`model.predict_classes()` is deprecated and '
you are happy
image1 = Image.open("/content/drive/MyDrive/images/unclassifiedImages/Sad/Sad14.jpg")
plt.imshow(image1)
plt.show()
rgbImage = image1.resize((224,224),Image.ANTIALIAS).convert('RGB')
plt.imshow(rgbImage)
plt.show()
Xt = []
Xt.append(np.array(rgbImage))
# Convert to NP array
Xt = np.array(Xt)
# Reshape 2D
Xt = Xt.reshape(Xt.shape[0], 224, 224, 3).astype('float32')
# Normalize the data
Xt = Xt /255
result = model3.predict_classes(Xt)
#result = np.argmax(modelC.predict(Xt))
plt.imshow(image1)
plt.show()
if result[0] == 1:
print("You are angry")
if result[0] == 2:
print("You are disgusted")
if result[0] == 3:
print("you are fear")
if result[0] == 4:
print("you are happy")
if result[0] == 5:
print("You are netural")
if result[0] == 6:
print("You are sad")
if result[0] == 7:
print("You are surprised")
/usr/local/lib/python3.7/dist-packages/tensorflow/python/keras/engine/sequential.py:450: UserWarning: `model.predict_classes()` is deprecated and will be removed after 2021-01-01. Please use instead:* `np.argmax(model.predict(x), axis=-1)`, if your model does multi-class classification (e.g. if it uses a `softmax` last-layer activation).* `(model.predict(x) > 0.5).astype("int32")`, if your model does binary classification (e.g. if it uses a `sigmoid` last-layer activation).
warnings.warn('`model.predict_classes()` is deprecated and '
you are happy
image1 = Image.open("/content/drive/MyDrive/images/unclassifiedImages/Sad/Sad15.jpg")
plt.imshow(image1)
plt.show()
rgbImage = image1.resize((224,224),Image.ANTIALIAS).convert('RGB')
plt.imshow(rgbImage)
plt.show()
Xt = []
Xt.append(np.array(rgbImage))
# Convert to NP array
Xt = np.array(Xt)
# Reshape 2D
Xt = Xt.reshape(Xt.shape[0], 224, 224, 3).astype('float32')
# Normalize the data
Xt = Xt /255
result = model3.predict_classes(Xt)
#result = np.argmax(modelC.predict(Xt))
plt.imshow(image1)
plt.show()
if result[0] == 1:
print("You are angry")
if result[0] == 2:
print("You are disgusted")
if result[0] == 3:
print("you are fear")
if result[0] == 4:
print("you are happy")
if result[0] == 5:
print("You are netural")
if result[0] == 6:
print("You are sad")
if result[0] == 7:
print("You are surprised")
/usr/local/lib/python3.7/dist-packages/tensorflow/python/keras/engine/sequential.py:450: UserWarning: `model.predict_classes()` is deprecated and will be removed after 2021-01-01. Please use instead:* `np.argmax(model.predict(x), axis=-1)`, if your model does multi-class classification (e.g. if it uses a `softmax` last-layer activation).* `(model.predict(x) > 0.5).astype("int32")`, if your model does binary classification (e.g. if it uses a `sigmoid` last-layer activation).
warnings.warn('`model.predict_classes()` is deprecated and '
you are happy
image1 = Image.open("/content/drive/MyDrive/images/unclassifiedImages/Sad/Sad16.jpg")
plt.imshow(image1)
plt.show()
rgbImage = image1.resize((224,224),Image.ANTIALIAS).convert('RGB')
plt.imshow(rgbImage)
plt.show()
Xt = []
Xt.append(np.array(rgbImage))
# Convert to NP array
Xt = np.array(Xt)
# Reshape 2D
Xt = Xt.reshape(Xt.shape[0], 224, 224, 3).astype('float32')
# Normalize the data
Xt = Xt /255
result = model3.predict_classes(Xt)
#result = np.argmax(modelC.predict(Xt))
plt.imshow(image1)
plt.show()
if result[0] == 1:
print("You are angry")
if result[0] == 2:
print("You are disgusted")
if result[0] == 3:
print("you are fear")
if result[0] == 4:
print("you are happy")
if result[0] == 5:
print("You are netural")
if result[0] == 6:
print("You are sad")
if result[0] == 7:
print("You are surprised")
/usr/local/lib/python3.7/dist-packages/tensorflow/python/keras/engine/sequential.py:450: UserWarning: `model.predict_classes()` is deprecated and will be removed after 2021-01-01. Please use instead:* `np.argmax(model.predict(x), axis=-1)`, if your model does multi-class classification (e.g. if it uses a `softmax` last-layer activation).* `(model.predict(x) > 0.5).astype("int32")`, if your model does binary classification (e.g. if it uses a `sigmoid` last-layer activation).
warnings.warn('`model.predict_classes()` is deprecated and '
you are happy
image1 = Image.open("/content/drive/MyDrive/images/unclassifiedImages/Sad/Sad17.jpg")
plt.imshow(image1)
plt.show()
rgbImage = image1.resize((224,224),Image.ANTIALIAS).convert('RGB')
plt.imshow(rgbImage)
plt.show()
Xt = []
Xt.append(np.array(rgbImage))
# Convert to NP array
Xt = np.array(Xt)
# Reshape 2D
Xt = Xt.reshape(Xt.shape[0], 224, 224, 3).astype('float32')
# Normalize the data
Xt = Xt /255
result = model3.predict_classes(Xt)
#result = np.argmax(modelC.predict(Xt))
plt.imshow(image1)
plt.show()
if result[0] == 1:
print("You are angry")
if result[0] == 2:
print("You are disgusted")
if result[0] == 3:
print("you are fear")
if result[0] == 4:
print("you are happy")
if result[0] == 5:
print("You are netural")
if result[0] == 6:
print("You are sad")
if result[0] == 7:
print("You are surprised")
/usr/local/lib/python3.7/dist-packages/tensorflow/python/keras/engine/sequential.py:450: UserWarning: `model.predict_classes()` is deprecated and will be removed after 2021-01-01. Please use instead:* `np.argmax(model.predict(x), axis=-1)`, if your model does multi-class classification (e.g. if it uses a `softmax` last-layer activation).* `(model.predict(x) > 0.5).astype("int32")`, if your model does binary classification (e.g. if it uses a `sigmoid` last-layer activation).
warnings.warn('`model.predict_classes()` is deprecated and '
You are sad
image1 = Image.open("/content/drive/MyDrive/images/unclassifiedImages/Sad/Sad18.jpg")
plt.imshow(image1)
plt.show()
rgbImage = image1.resize((224,224),Image.ANTIALIAS).convert('RGB')
plt.imshow(rgbImage)
plt.show()
Xt = []
Xt.append(np.array(rgbImage))
# Convert to NP array
Xt = np.array(Xt)
# Reshape 2D
Xt = Xt.reshape(Xt.shape[0], 224, 224, 3).astype('float32')
# Normalize the data
Xt = Xt /255
result = model3.predict_classes(Xt)
#result = np.argmax(modelC.predict(Xt))
plt.imshow(image1)
plt.show()
if result[0] == 1:
print("You are angry")
if result[0] == 2:
print("You are disgusted")
if result[0] == 3:
print("you are fear")
if result[0] == 4:
print("you are happy")
if result[0] == 5:
print("You are netural")
if result[0] == 6:
print("You are sad")
if result[0] == 7:
print("You are surprised")
/usr/local/lib/python3.7/dist-packages/tensorflow/python/keras/engine/sequential.py:450: UserWarning: `model.predict_classes()` is deprecated and will be removed after 2021-01-01. Please use instead:* `np.argmax(model.predict(x), axis=-1)`, if your model does multi-class classification (e.g. if it uses a `softmax` last-layer activation).* `(model.predict(x) > 0.5).astype("int32")`, if your model does binary classification (e.g. if it uses a `sigmoid` last-layer activation).
warnings.warn('`model.predict_classes()` is deprecated and '
You are surprised
image1 = Image.open("/content/drive/MyDrive/images/unclassifiedImages/Sad/Sad19.jpg")
plt.imshow(image1)
plt.show()
rgbImage = image1.resize((224,224),Image.ANTIALIAS).convert('RGB')
plt.imshow(rgbImage)
plt.show()
Xt = []
Xt.append(np.array(rgbImage))
# Convert to NP array
Xt = np.array(Xt)
# Reshape 2D
Xt = Xt.reshape(Xt.shape[0], 224, 224, 3).astype('float32')
# Normalize the data
Xt = Xt /255
result = model3.predict_classes(Xt)
#result = np.argmax(modelC.predict(Xt))
plt.imshow(image1)
plt.show()
if result[0] == 1:
print("You are angry")
if result[0] == 2:
print("You are disgusted")
if result[0] == 3:
print("you are fear")
if result[0] == 4:
print("you are happy")
if result[0] == 5:
print("You are netural")
if result[0] == 6:
print("You are sad")
if result[0] == 7:
print("You are surprised")
/usr/local/lib/python3.7/dist-packages/tensorflow/python/keras/engine/sequential.py:450: UserWarning: `model.predict_classes()` is deprecated and will be removed after 2021-01-01. Please use instead:* `np.argmax(model.predict(x), axis=-1)`, if your model does multi-class classification (e.g. if it uses a `softmax` last-layer activation).* `(model.predict(x) > 0.5).astype("int32")`, if your model does binary classification (e.g. if it uses a `sigmoid` last-layer activation).
warnings.warn('`model.predict_classes()` is deprecated and '
You are surprised
image1 = Image.open("/content/drive/MyDrive/images/unclassifiedImages/Sad/Sad20.jpg")
plt.imshow(image1)
plt.show()
rgbImage = image1.resize((224,224),Image.ANTIALIAS).convert('RGB')
plt.imshow(rgbImage)
plt.show()
Xt = []
Xt.append(np.array(rgbImage))
# Convert to NP array
Xt = np.array(Xt)
# Reshape 2D
Xt = Xt.reshape(Xt.shape[0], 224, 224, 3).astype('float32')
# Normalize the data
Xt = Xt /255
result = model3.predict_classes(Xt)
#result = np.argmax(modelC.predict(Xt))
plt.imshow(image1)
plt.show()
if result[0] == 1:
print("You are angry")
if result[0] == 2:
print("You are disgusted")
if result[0] == 3:
print("you are fear")
if result[0] == 4:
print("you are happy")
if result[0] == 5:
print("You are netural")
if result[0] == 6:
print("You are sad")
if result[0] == 7:
print("You are surprised")
/usr/local/lib/python3.7/dist-packages/tensorflow/python/keras/engine/sequential.py:450: UserWarning: `model.predict_classes()` is deprecated and will be removed after 2021-01-01. Please use instead:* `np.argmax(model.predict(x), axis=-1)`, if your model does multi-class classification (e.g. if it uses a `softmax` last-layer activation).* `(model.predict(x) > 0.5).astype("int32")`, if your model does binary classification (e.g. if it uses a `sigmoid` last-layer activation).
warnings.warn('`model.predict_classes()` is deprecated and '
you are happy
Surprised
image1 = Image.open("/content/drive/MyDrive/images/unclassifiedImages/Surprised/Surprised1.jpg")
plt.imshow(image1)
plt.show()
rgbImage = image1.resize((224,224),Image.ANTIALIAS).convert('RGB')
plt.imshow(rgbImage)
plt.show()
Xt = []
Xt.append(np.array(rgbImage))
# Convert to NP array
Xt = np.array(Xt)
# Reshape 2D
Xt = Xt.reshape(Xt.shape[0], 224, 224, 3).astype('float32')
# Normalize the data
Xt = Xt /255
result = model3.predict_classes(Xt)
#result = np.argmax(modelC.predict(Xt))
plt.imshow(image1)
plt.show()
if result[0] == 1:
print("You are angry")
if result[0] == 2:
print("You are disgusted")
if result[0] == 3:
print("you are fear")
if result[0] == 4:
print("you are happy")
if result[0] == 5:
print("You are netural")
if result[0] == 6:
print("You are sad")
if result[0] == 7:
print("You are surprised")
/usr/local/lib/python3.7/dist-packages/tensorflow/python/keras/engine/sequential.py:450: UserWarning: `model.predict_classes()` is deprecated and will be removed after 2021-01-01. Please use instead:* `np.argmax(model.predict(x), axis=-1)`, if your model does multi-class classification (e.g. if it uses a `softmax` last-layer activation).* `(model.predict(x) > 0.5).astype("int32")`, if your model does binary classification (e.g. if it uses a `sigmoid` last-layer activation).
warnings.warn('`model.predict_classes()` is deprecated and '
You are surprised
image1 = Image.open("/content/drive/MyDrive/images/unclassifiedImages/Surprised/Surprised2.jpg")
plt.imshow(image1)
plt.show()
rgbImage = image1.resize((224,224),Image.ANTIALIAS).convert('RGB')
plt.imshow(rgbImage)
plt.show()
Xt = []
Xt.append(np.array(rgbImage))
# Convert to NP array
Xt = np.array(Xt)
# Reshape 2D
Xt = Xt.reshape(Xt.shape[0], 224, 224, 3).astype('float32')
# Normalize the data
Xt = Xt /255
result = model3.predict_classes(Xt)
#result = np.argmax(modelC.predict(Xt))
plt.imshow(image1)
plt.show()
if result[0] == 1:
print("You are angry")
if result[0] == 2:
print("You are disgusted")
if result[0] == 3:
print("you are fear")
if result[0] == 4:
print("you are happy")
if result[0] == 5:
print("You are netural")
if result[0] == 6:
print("You are sad")
if result[0] == 7:
print("You are surprised")
/usr/local/lib/python3.7/dist-packages/tensorflow/python/keras/engine/sequential.py:450: UserWarning: `model.predict_classes()` is deprecated and will be removed after 2021-01-01. Please use instead:* `np.argmax(model.predict(x), axis=-1)`, if your model does multi-class classification (e.g. if it uses a `softmax` last-layer activation).* `(model.predict(x) > 0.5).astype("int32")`, if your model does binary classification (e.g. if it uses a `sigmoid` last-layer activation).
warnings.warn('`model.predict_classes()` is deprecated and '
you are happy
image1 = Image.open("/content/drive/MyDrive/images/unclassifiedImages/Surprised/Surprised3.jpg")
plt.imshow(image1)
plt.show()
rgbImage = image1.resize((224,224),Image.ANTIALIAS).convert('RGB')
plt.imshow(rgbImage)
plt.show()
Xt = []
Xt.append(np.array(rgbImage))
# Convert to NP array
Xt = np.array(Xt)
# Reshape 2D
Xt = Xt.reshape(Xt.shape[0], 224, 224, 3).astype('float32')
# Normalize the data
Xt = Xt /255
result = model3.predict_classes(Xt)
#result = np.argmax(modelC.predict(Xt))
plt.imshow(image1)
plt.show()
if result[0] == 1:
print("You are angry")
if result[0] == 2:
print("You are disgusted")
if result[0] == 3:
print("you are fear")
if result[0] == 4:
print("you are happy")
if result[0] == 5:
print("You are netural")
if result[0] == 6:
print("You are sad")
if result[0] == 7:
print("You are surprised")
/usr/local/lib/python3.7/dist-packages/tensorflow/python/keras/engine/sequential.py:450: UserWarning: `model.predict_classes()` is deprecated and will be removed after 2021-01-01. Please use instead:* `np.argmax(model.predict(x), axis=-1)`, if your model does multi-class classification (e.g. if it uses a `softmax` last-layer activation).* `(model.predict(x) > 0.5).astype("int32")`, if your model does binary classification (e.g. if it uses a `sigmoid` last-layer activation).
warnings.warn('`model.predict_classes()` is deprecated and '
you are happy
image1 = Image.open("/content/drive/MyDrive/images/unclassifiedImages/Surprised/Surprised4.jpg")
plt.imshow(image1)
plt.show()
rgbImage = image1.resize((224,224),Image.ANTIALIAS).convert('RGB')
plt.imshow(rgbImage)
plt.show()
Xt = []
Xt.append(np.array(rgbImage))
# Convert to NP array
Xt = np.array(Xt)
# Reshape 2D
Xt = Xt.reshape(Xt.shape[0], 224, 224, 3).astype('float32')
# Normalize the data
Xt = Xt /255
result = model3.predict_classes(Xt)
#result = np.argmax(modelC.predict(Xt))
plt.imshow(image1)
plt.show()
if result[0] == 1:
print("You are angry")
if result[0] == 2:
print("You are disgusted")
if result[0] == 3:
print("you are fear")
if result[0] == 4:
print("you are happy")
if result[0] == 5:
print("You are netural")
if result[0] == 6:
print("You are sad")
if result[0] == 7:
print("You are surprised")
/usr/local/lib/python3.7/dist-packages/tensorflow/python/keras/engine/sequential.py:450: UserWarning: `model.predict_classes()` is deprecated and will be removed after 2021-01-01. Please use instead:* `np.argmax(model.predict(x), axis=-1)`, if your model does multi-class classification (e.g. if it uses a `softmax` last-layer activation).* `(model.predict(x) > 0.5).astype("int32")`, if your model does binary classification (e.g. if it uses a `sigmoid` last-layer activation).
warnings.warn('`model.predict_classes()` is deprecated and '
you are happy
image1 = Image.open("/content/drive/MyDrive/images/unclassifiedImages/Surprised/Surprised5.jpg")
plt.imshow(image1)
plt.show()
rgbImage = image1.resize((224,224),Image.ANTIALIAS).convert('RGB')
plt.imshow(rgbImage)
plt.show()
Xt = []
Xt.append(np.array(rgbImage))
# Convert to NP array
Xt = np.array(Xt)
# Reshape 2D
Xt = Xt.reshape(Xt.shape[0], 224, 224, 3).astype('float32')
# Normalize the data
Xt = Xt /255
result = model3.predict_classes(Xt)
#result = np.argmax(modelC.predict(Xt))
plt.imshow(image1)
plt.show()
if result[0] == 1:
print("You are angry")
if result[0] == 2:
print("You are disgusted")
if result[0] == 3:
print("you are fear")
if result[0] == 4:
print("you are happy")
if result[0] == 5:
print("You are netural")
if result[0] == 6:
print("You are sad")
if result[0] == 7:
print("You are surprised")
/usr/local/lib/python3.7/dist-packages/tensorflow/python/keras/engine/sequential.py:450: UserWarning: `model.predict_classes()` is deprecated and will be removed after 2021-01-01. Please use instead:* `np.argmax(model.predict(x), axis=-1)`, if your model does multi-class classification (e.g. if it uses a `softmax` last-layer activation).* `(model.predict(x) > 0.5).astype("int32")`, if your model does binary classification (e.g. if it uses a `sigmoid` last-layer activation).
warnings.warn('`model.predict_classes()` is deprecated and '
you are happy
image1 = Image.open("/content/drive/MyDrive/images/unclassifiedImages/Surprised/Surprised6.jpg")
plt.imshow(image1)
plt.show()
rgbImage = image1.resize((224,224),Image.ANTIALIAS).convert('RGB')
plt.imshow(rgbImage)
plt.show()
Xt = []
Xt.append(np.array(rgbImage))
# Convert to NP array
Xt = np.array(Xt)
# Reshape 2D
Xt = Xt.reshape(Xt.shape[0], 224, 224, 3).astype('float32')
# Normalize the data
Xt = Xt /255
result = model3.predict_classes(Xt)
#result = np.argmax(modelC.predict(Xt))
plt.imshow(image1)
plt.show()
if result[0] == 1:
print("You are angry")
if result[0] == 2:
print("You are disgusted")
if result[0] == 3:
print("you are fear")
if result[0] == 4:
print("you are happy")
if result[0] == 5:
print("You are netural")
if result[0] == 6:
print("You are sad")
if result[0] == 7:
print("You are surprised")
/usr/local/lib/python3.7/dist-packages/tensorflow/python/keras/engine/sequential.py:450: UserWarning: `model.predict_classes()` is deprecated and will be removed after 2021-01-01. Please use instead:* `np.argmax(model.predict(x), axis=-1)`, if your model does multi-class classification (e.g. if it uses a `softmax` last-layer activation).* `(model.predict(x) > 0.5).astype("int32")`, if your model does binary classification (e.g. if it uses a `sigmoid` last-layer activation).
warnings.warn('`model.predict_classes()` is deprecated and '
you are happy
image1 = Image.open("/content/drive/MyDrive/images/unclassifiedImages/Surprised/Surprised7.jpg")
plt.imshow(image1)
plt.show()
rgbImage = image1.resize((224,224),Image.ANTIALIAS).convert('RGB')
plt.imshow(rgbImage)
plt.show()
Xt = []
Xt.append(np.array(rgbImage))
# Convert to NP array
Xt = np.array(Xt)
# Reshape 2D
Xt = Xt.reshape(Xt.shape[0], 224, 224, 3).astype('float32')
# Normalize the data
Xt = Xt /255
result = model3.predict_classes(Xt)
#result = np.argmax(modelC.predict(Xt))
plt.imshow(image1)
plt.show()
if result[0] == 1:
print("You are angry")
if result[0] == 2:
print("You are disgusted")
if result[0] == 3:
print("you are fear")
if result[0] == 4:
print("you are happy")
if result[0] == 5:
print("You are netural")
if result[0] == 6:
print("You are sad")
if result[0] == 7:
print("You are surprised")
/usr/local/lib/python3.7/dist-packages/tensorflow/python/keras/engine/sequential.py:450: UserWarning: `model.predict_classes()` is deprecated and will be removed after 2021-01-01. Please use instead:* `np.argmax(model.predict(x), axis=-1)`, if your model does multi-class classification (e.g. if it uses a `softmax` last-layer activation).* `(model.predict(x) > 0.5).astype("int32")`, if your model does binary classification (e.g. if it uses a `sigmoid` last-layer activation).
warnings.warn('`model.predict_classes()` is deprecated and '
You are surprised
image1 = Image.open("/content/drive/MyDrive/images/unclassifiedImages/Surprised/Surprised8.jpg")
plt.imshow(image1)
plt.show()
rgbImage = image1.resize((224,224),Image.ANTIALIAS).convert('RGB')
plt.imshow(rgbImage)
plt.show()
Xt = []
Xt.append(np.array(rgbImage))
# Convert to NP array
Xt = np.array(Xt)
# Reshape 2D
Xt = Xt.reshape(Xt.shape[0], 224, 224, 3).astype('float32')
# Normalize the data
Xt = Xt /255
result = model3.predict_classes(Xt)
#result = np.argmax(modelC.predict(Xt))
plt.imshow(image1)
plt.show()
if result[0] == 1:
print("You are angry")
if result[0] == 2:
print("You are disgusted")
if result[0] == 3:
print("you are fear")
if result[0] == 4:
print("you are happy")
if result[0] == 5:
print("You are netural")
if result[0] == 6:
print("You are sad")
if result[0] == 7:
print("You are surprised")
/usr/local/lib/python3.7/dist-packages/tensorflow/python/keras/engine/sequential.py:450: UserWarning: `model.predict_classes()` is deprecated and will be removed after 2021-01-01. Please use instead:* `np.argmax(model.predict(x), axis=-1)`, if your model does multi-class classification (e.g. if it uses a `softmax` last-layer activation).* `(model.predict(x) > 0.5).astype("int32")`, if your model does binary classification (e.g. if it uses a `sigmoid` last-layer activation).
warnings.warn('`model.predict_classes()` is deprecated and '
you are happy
image1 = Image.open("/content/drive/MyDrive/images/unclassifiedImages/Surprised/Surprised9.jpg")
plt.imshow(image1)
plt.show()
rgbImage = image1.resize((224,224),Image.ANTIALIAS).convert('RGB')
plt.imshow(rgbImage)
plt.show()
Xt = []
Xt.append(np.array(rgbImage))
# Convert to NP array
Xt = np.array(Xt)
# Reshape 2D
Xt = Xt.reshape(Xt.shape[0], 224, 224, 3).astype('float32')
# Normalize the data
Xt = Xt /255
result = model3.predict_classes(Xt)
#result = np.argmax(modelC.predict(Xt))
plt.imshow(image1)
plt.show()
if result[0] == 1:
print("You are angry")
if result[0] == 2:
print("You are disgusted")
if result[0] == 3:
print("you are fear")
if result[0] == 4:
print("you are happy")
if result[0] == 5:
print("You are netural")
if result[0] == 6:
print("You are sad")
if result[0] == 7:
print("You are surprised")
/usr/local/lib/python3.7/dist-packages/tensorflow/python/keras/engine/sequential.py:450: UserWarning: `model.predict_classes()` is deprecated and will be removed after 2021-01-01. Please use instead:* `np.argmax(model.predict(x), axis=-1)`, if your model does multi-class classification (e.g. if it uses a `softmax` last-layer activation).* `(model.predict(x) > 0.5).astype("int32")`, if your model does binary classification (e.g. if it uses a `sigmoid` last-layer activation).
warnings.warn('`model.predict_classes()` is deprecated and '
You are surprised
image1 = Image.open("/content/drive/MyDrive/images/unclassifiedImages/Surprised/Surprised10.jpg")
plt.imshow(image1)
plt.show()
rgbImage = image1.resize((224,224),Image.ANTIALIAS).convert('RGB')
plt.imshow(rgbImage)
plt.show()
Xt = []
Xt.append(np.array(rgbImage))
# Convert to NP array
Xt = np.array(Xt)
# Reshape 2D
Xt = Xt.reshape(Xt.shape[0], 224, 224, 3).astype('float32')
# Normalize the data
Xt = Xt /255
result = model3.predict_classes(Xt)
#result = np.argmax(modelC.predict(Xt))
plt.imshow(image1)
plt.show()
if result[0] == 1:
print("You are angry")
if result[0] == 2:
print("You are disgusted")
if result[0] == 3:
print("you are fear")
if result[0] == 4:
print("you are happy")
if result[0] == 5:
print("You are netural")
if result[0] == 6:
print("You are sad")
if result[0] == 7:
print("You are surprised")
/usr/local/lib/python3.7/dist-packages/tensorflow/python/keras/engine/sequential.py:450: UserWarning: `model.predict_classes()` is deprecated and will be removed after 2021-01-01. Please use instead:* `np.argmax(model.predict(x), axis=-1)`, if your model does multi-class classification (e.g. if it uses a `softmax` last-layer activation).* `(model.predict(x) > 0.5).astype("int32")`, if your model does binary classification (e.g. if it uses a `sigmoid` last-layer activation).
warnings.warn('`model.predict_classes()` is deprecated and '
You are surprised
image1 = Image.open("/content/drive/MyDrive/images/unclassifiedImages/Surprised/Surprised11.jpg")
plt.imshow(image1)
plt.show()
rgbImage = image1.resize((224,224),Image.ANTIALIAS).convert('RGB')
plt.imshow(rgbImage)
plt.show()
Xt = []
Xt.append(np.array(rgbImage))
# Convert to NP array
Xt = np.array(Xt)
# Reshape 2D
Xt = Xt.reshape(Xt.shape[0], 224, 224, 3).astype('float32')
# Normalize the data
Xt = Xt /255
result = model3.predict_classes(Xt)
#result = np.argmax(modelC.predict(Xt))
plt.imshow(image1)
plt.show()
if result[0] == 1:
print("You are angry")
if result[0] == 2:
print("You are disgusted")
if result[0] == 3:
print("you are fear")
if result[0] == 4:
print("you are happy")
if result[0] == 5:
print("You are netural")
if result[0] == 6:
print("You are sad")
if result[0] == 7:
print("You are surprised")
/usr/local/lib/python3.7/dist-packages/tensorflow/python/keras/engine/sequential.py:450: UserWarning: `model.predict_classes()` is deprecated and will be removed after 2021-01-01. Please use instead:* `np.argmax(model.predict(x), axis=-1)`, if your model does multi-class classification (e.g. if it uses a `softmax` last-layer activation).* `(model.predict(x) > 0.5).astype("int32")`, if your model does binary classification (e.g. if it uses a `sigmoid` last-layer activation).
warnings.warn('`model.predict_classes()` is deprecated and '
You are surprised
image1 = Image.open("/content/drive/MyDrive/images/unclassifiedImages/Surprised/Surprised12.jpg")
plt.imshow(image1)
plt.show()
rgbImage = image1.resize((224,224),Image.ANTIALIAS).convert('RGB')
plt.imshow(rgbImage)
plt.show()
Xt = []
Xt.append(np.array(rgbImage))
# Convert to NP array
Xt = np.array(Xt)
# Reshape 2D
Xt = Xt.reshape(Xt.shape[0], 224, 224, 3).astype('float32')
# Normalize the data
Xt = Xt /255
result = model3.predict_classes(Xt)
#result = np.argmax(modelC.predict(Xt))
plt.imshow(image1)
plt.show()
if result[0] == 1:
print("You are angry")
if result[0] == 2:
print("You are disgusted")
if result[0] == 3:
print("you are fear")
if result[0] == 4:
print("you are happy")
if result[0] == 5:
print("You are netural")
if result[0] == 6:
print("You are sad")
if result[0] == 7:
print("You are surprised")
/usr/local/lib/python3.7/dist-packages/tensorflow/python/keras/engine/sequential.py:450: UserWarning: `model.predict_classes()` is deprecated and will be removed after 2021-01-01. Please use instead:* `np.argmax(model.predict(x), axis=-1)`, if your model does multi-class classification (e.g. if it uses a `softmax` last-layer activation).* `(model.predict(x) > 0.5).astype("int32")`, if your model does binary classification (e.g. if it uses a `sigmoid` last-layer activation).
warnings.warn('`model.predict_classes()` is deprecated and '
You are surprised
image1 = Image.open("/content/drive/MyDrive/images/unclassifiedImages/Surprised/Surprised13.jpg")
plt.imshow(image1)
plt.show()
rgbImage = image1.resize((224,224),Image.ANTIALIAS).convert('RGB')
plt.imshow(rgbImage)
plt.show()
Xt = []
Xt.append(np.array(rgbImage))
# Convert to NP array
Xt = np.array(Xt)
# Reshape 2D
Xt = Xt.reshape(Xt.shape[0], 224, 224, 3).astype('float32')
# Normalize the data
Xt = Xt /255
result = model3.predict_classes(Xt)
#result = np.argmax(modelC.predict(Xt))
plt.imshow(image1)
plt.show()
if result[0] == 1:
print("You are angry")
if result[0] == 2:
print("You are disgusted")
if result[0] == 3:
print("you are fear")
if result[0] == 4:
print("you are happy")
if result[0] == 5:
print("You are netural")
if result[0] == 6:
print("You are sad")
if result[0] == 7:
print("You are surprised")
/usr/local/lib/python3.7/dist-packages/tensorflow/python/keras/engine/sequential.py:450: UserWarning: `model.predict_classes()` is deprecated and will be removed after 2021-01-01. Please use instead:* `np.argmax(model.predict(x), axis=-1)`, if your model does multi-class classification (e.g. if it uses a `softmax` last-layer activation).* `(model.predict(x) > 0.5).astype("int32")`, if your model does binary classification (e.g. if it uses a `sigmoid` last-layer activation).
warnings.warn('`model.predict_classes()` is deprecated and '
You are surprised
image1 = Image.open("/content/drive/MyDrive/images/unclassifiedImages/Surprised/Surprised14.jpg")
plt.imshow(image1)
plt.show()
rgbImage = image1.resize((224,224),Image.ANTIALIAS).convert('RGB')
plt.imshow(rgbImage)
plt.show()
Xt = []
Xt.append(np.array(rgbImage))
# Convert to NP array
Xt = np.array(Xt)
# Reshape 2D
Xt = Xt.reshape(Xt.shape[0], 224, 224, 3).astype('float32')
# Normalize the data
Xt = Xt /255
result = model3.predict_classes(Xt)
#result = np.argmax(modelC.predict(Xt))
plt.imshow(image1)
plt.show()
if result[0] == 1:
print("You are angry")
if result[0] == 2:
print("You are disgusted")
if result[0] == 3:
print("you are fear")
if result[0] == 4:
print("you are happy")
if result[0] == 5:
print("You are netural")
if result[0] == 6:
print("You are sad")
if result[0] == 7:
print("You are surprised")
/usr/local/lib/python3.7/dist-packages/tensorflow/python/keras/engine/sequential.py:450: UserWarning: `model.predict_classes()` is deprecated and will be removed after 2021-01-01. Please use instead:* `np.argmax(model.predict(x), axis=-1)`, if your model does multi-class classification (e.g. if it uses a `softmax` last-layer activation).* `(model.predict(x) > 0.5).astype("int32")`, if your model does binary classification (e.g. if it uses a `sigmoid` last-layer activation).
warnings.warn('`model.predict_classes()` is deprecated and '
You are surprised
image1 = Image.open("/content/drive/MyDrive/images/unclassifiedImages/Surprised/Surprised15.jpg")
plt.imshow(image1)
plt.show()
rgbImage = image1.resize((224,224),Image.ANTIALIAS).convert('RGB')
plt.imshow(rgbImage)
plt.show()
Xt = []
Xt.append(np.array(rgbImage))
# Convert to NP array
Xt = np.array(Xt)
# Reshape 2D
Xt = Xt.reshape(Xt.shape[0], 224, 224, 3).astype('float32')
# Normalize the data
Xt = Xt /255
result = model3.predict_classes(Xt)
#result = np.argmax(modelC.predict(Xt))
plt.imshow(image1)
plt.show()
if result[0] == 1:
print("You are angry")
if result[0] == 2:
print("You are disgusted")
if result[0] == 3:
print("you are fear")
if result[0] == 4:
print("you are happy")
if result[0] == 5:
print("You are netural")
if result[0] == 6:
print("You are sad")
if result[0] == 7:
print("You are surprised")
/usr/local/lib/python3.7/dist-packages/tensorflow/python/keras/engine/sequential.py:450: UserWarning: `model.predict_classes()` is deprecated and will be removed after 2021-01-01. Please use instead:* `np.argmax(model.predict(x), axis=-1)`, if your model does multi-class classification (e.g. if it uses a `softmax` last-layer activation).* `(model.predict(x) > 0.5).astype("int32")`, if your model does binary classification (e.g. if it uses a `sigmoid` last-layer activation).
warnings.warn('`model.predict_classes()` is deprecated and '
you are happy
image1 = Image.open("/content/drive/MyDrive/images/unclassifiedImages/Surprised/Surprised16.jpg")
plt.imshow(image1)
plt.show()
rgbImage = image1.resize((224,224),Image.ANTIALIAS).convert('RGB')
plt.imshow(rgbImage)
plt.show()
Xt = []
Xt.append(np.array(rgbImage))
# Convert to NP array
Xt = np.array(Xt)
# Reshape 2D
Xt = Xt.reshape(Xt.shape[0], 224, 224, 3).astype('float32')
# Normalize the data
Xt = Xt /255
result = model3.predict_classes(Xt)
#result = np.argmax(modelC.predict(Xt))
plt.imshow(image1)
plt.show()
if result[0] == 1:
print("You are angry")
if result[0] == 2:
print("You are disgusted")
if result[0] == 3:
print("you are fear")
if result[0] == 4:
print("you are happy")
if result[0] == 5:
print("You are netural")
if result[0] == 6:
print("You are sad")
if result[0] == 7:
print("You are surprised")
/usr/local/lib/python3.7/dist-packages/tensorflow/python/keras/engine/sequential.py:450: UserWarning: `model.predict_classes()` is deprecated and will be removed after 2021-01-01. Please use instead:* `np.argmax(model.predict(x), axis=-1)`, if your model does multi-class classification (e.g. if it uses a `softmax` last-layer activation).* `(model.predict(x) > 0.5).astype("int32")`, if your model does binary classification (e.g. if it uses a `sigmoid` last-layer activation).
warnings.warn('`model.predict_classes()` is deprecated and '
you are happy
image1 = Image.open("/content/drive/MyDrive/images/unclassifiedImages/Surprised/Surprised17.jpg")
plt.imshow(image1)
plt.show()
rgbImage = image1.resize((224,224),Image.ANTIALIAS).convert('RGB')
plt.imshow(rgbImage)
plt.show()
Xt = []
Xt.append(np.array(rgbImage))
# Convert to NP array
Xt = np.array(Xt)
# Reshape 2D
Xt = Xt.reshape(Xt.shape[0], 224, 224, 3).astype('float32')
# Normalize the data
Xt = Xt /255
result = model3.predict_classes(Xt)
#result = np.argmax(modelC.predict(Xt))
plt.imshow(image1)
plt.show()
if result[0] == 1:
print("You are angry")
if result[0] == 2:
print("You are disgusted")
if result[0] == 3:
print("you are fear")
if result[0] == 4:
print("you are happy")
if result[0] == 5:
print("You are netural")
if result[0] == 6:
print("You are sad")
if result[0] == 7:
print("You are surprised")
/usr/local/lib/python3.7/dist-packages/tensorflow/python/keras/engine/sequential.py:450: UserWarning: `model.predict_classes()` is deprecated and will be removed after 2021-01-01. Please use instead:* `np.argmax(model.predict(x), axis=-1)`, if your model does multi-class classification (e.g. if it uses a `softmax` last-layer activation).* `(model.predict(x) > 0.5).astype("int32")`, if your model does binary classification (e.g. if it uses a `sigmoid` last-layer activation).
warnings.warn('`model.predict_classes()` is deprecated and '
You are surprised
image1 = Image.open("/content/drive/MyDrive/images/unclassifiedImages/Surprised/Surprised18.jpg")
plt.imshow(image1)
plt.show()
rgbImage = image1.resize((224,224),Image.ANTIALIAS).convert('RGB')
plt.imshow(rgbImage)
plt.show()
Xt = []
Xt.append(np.array(rgbImage))
# Convert to NP array
Xt = np.array(Xt)
# Reshape 2D
Xt = Xt.reshape(Xt.shape[0], 224, 224, 3).astype('float32')
# Normalize the data
Xt = Xt /255
result = model3.predict_classes(Xt)
#result = np.argmax(modelC.predict(Xt))
plt.imshow(image1)
plt.show()
if result[0] == 1:
print("You are angry")
if result[0] == 2:
print("You are disgusted")
if result[0] == 3:
print("you are fear")
if result[0] == 4:
print("you are happy")
if result[0] == 5:
print("You are netural")
if result[0] == 6:
print("You are sad")
if result[0] == 7:
print("You are surprised")
/usr/local/lib/python3.7/dist-packages/tensorflow/python/keras/engine/sequential.py:450: UserWarning: `model.predict_classes()` is deprecated and will be removed after 2021-01-01. Please use instead:* `np.argmax(model.predict(x), axis=-1)`, if your model does multi-class classification (e.g. if it uses a `softmax` last-layer activation).* `(model.predict(x) > 0.5).astype("int32")`, if your model does binary classification (e.g. if it uses a `sigmoid` last-layer activation).
warnings.warn('`model.predict_classes()` is deprecated and '
You are surprised
image1 = Image.open("/content/drive/MyDrive/images/unclassifiedImages/Surprised/Surprised19.jpg")
plt.imshow(image1)
plt.show()
rgbImage = image1.resize((224,224),Image.ANTIALIAS).convert('RGB')
plt.imshow(rgbImage)
plt.show()
Xt = []
Xt.append(np.array(rgbImage))
# Convert to NP array
Xt = np.array(Xt)
# Reshape 2D
Xt = Xt.reshape(Xt.shape[0], 224, 224, 3).astype('float32')
# Normalize the data
Xt = Xt /255
result = model3.predict_classes(Xt)
#result = np.argmax(modelC.predict(Xt))
plt.imshow(image1)
plt.show()
if result[0] == 1:
print("You are angry")
if result[0] == 2:
print("You are disgusted")
if result[0] == 3:
print("you are fear")
if result[0] == 4:
print("you are happy")
if result[0] == 5:
print("You are netural")
if result[0] == 6:
print("You are sad")
if result[0] == 7:
print("You are surprised")
/usr/local/lib/python3.7/dist-packages/tensorflow/python/keras/engine/sequential.py:450: UserWarning: `model.predict_classes()` is deprecated and will be removed after 2021-01-01. Please use instead:* `np.argmax(model.predict(x), axis=-1)`, if your model does multi-class classification (e.g. if it uses a `softmax` last-layer activation).* `(model.predict(x) > 0.5).astype("int32")`, if your model does binary classification (e.g. if it uses a `sigmoid` last-layer activation).
warnings.warn('`model.predict_classes()` is deprecated and '
you are happy
image1 = Image.open("/content/drive/MyDrive/images/unclassifiedImages/Surprised/Surprised20.jpg")
plt.imshow(image1)
plt.show()
rgbImage = image1.resize((224,224),Image.ANTIALIAS).convert('RGB')
plt.imshow(rgbImage)
plt.show()
Xt = []
Xt.append(np.array(rgbImage))
# Convert to NP array
Xt = np.array(Xt)
# Reshape 2D
Xt = Xt.reshape(Xt.shape[0], 224, 224, 3).astype('float32')
# Normalize the data
Xt = Xt /255
result = model3.predict_classes(Xt)
#result = np.argmax(modelC.predict(Xt))
plt.imshow(image1)
plt.show()
if result[0] == 1:
print("You are angry")
if result[0] == 2:
print("You are disgusted")
if result[0] == 3:
print("you are fear")
if result[0] == 4:
print("you are happy")
if result[0] == 5:
print("You are netural")
if result[0] == 6:
print("You are sad")
if result[0] == 7:
print("You are surprised")
/usr/local/lib/python3.7/dist-packages/tensorflow/python/keras/engine/sequential.py:450: UserWarning: `model.predict_classes()` is deprecated and will be removed after 2021-01-01. Please use instead:* `np.argmax(model.predict(x), axis=-1)`, if your model does multi-class classification (e.g. if it uses a `softmax` last-layer activation).* `(model.predict(x) > 0.5).astype("int32")`, if your model does binary classification (e.g. if it uses a `sigmoid` last-layer activation).
warnings.warn('`model.predict_classes()` is deprecated and '
You are surprised